:root {
    --app-vh: 1vh;
    --auth-primary: #197a47;
    --auth-primary-dark: #125732;
    --auth-primary-deep: #17382d;
    --auth-primary-soft: #e5f6ed;
    --auth-line: #d1e2d8;
    --auth-ink: #0e2219;
    --auth-text: #1d3329;
    --auth-muted: #50675b;
    --auth-shadow: 0 24px 70px rgba(23, 56, 45, .13);
    --auth-gradient: linear-gradient(135deg, #1b4e45 0%, #197a47 50%, #388a1e 100%);
    --auth-gradient-deep: linear-gradient(135deg, #0d211a 0%, #17382d 52%, #125732 100%);
}

body.public {
    min-width: 320px;
    min-height: 100vh;
    color: var(--auth-text);
    background: #fff;
}

body.public img,
body.public svg {
    max-width: 100%;
}

body.public svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-topbar {
    position: fixed;
    z-index: 30;
    inset: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 92px;
    padding: 0 clamp(24px, 5vw, 72px);
    border-bottom: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 28px rgba(13, 65, 42, .08);
    backdrop-filter: blur(16px);
}

.auth-brand,
.back-home {
    display: inline-flex;
    align-items: center;
    color: var(--auth-ink);
}

.auth-brand {
    gap: 13px;
    min-width: 0;
}

.auth-brand span:last-child {
    display: flex;
    flex-direction: column;
}

.auth-brand strong {
    color: var(--auth-primary-dark);
    font-size: 26px;
    font-weight: 900;
    line-height: 1.08;
}

.auth-brand small {
    margin-top: 4px;
    color: var(--auth-muted);
    font-size: 15px;
    font-weight: 600;
}

.auth-seal {
    display: grid;
    place-items: center;
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    padding: 4px;
    border: 1px solid #bcdcc9;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 9px 22px rgba(13, 65, 42, .14);
    overflow: hidden;
}

.auth-seal img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.back-home {
    gap: 10px;
    min-height: 42px;
    padding: 0 6px;
    color: var(--auth-primary-dark);
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
}

.back-home svg {
    width: 18px;
    height: 18px;
    transition: transform .18s ease;
}

.back-home:hover svg {
    transform: translateX(-4px);
}

.auth-page-shell {
    min-height: calc(var(--app-vh, 1vh) * 100);
    display: grid;
    grid-template-columns: 56% 44%;
    padding-top: 92px;
    background: #fff;
}

.register-page-shell {
    grid-template-columns: minmax(480px, 47%) minmax(620px, 53%);
}

.auth-showcase {
    position: relative;
    min-height: calc(var(--app-vh, 1vh) * 100 - 92px);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 74px clamp(36px, 5vw, 86px) 210px;
    background:
        linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(246,253,249,.90) 32%, rgba(255,255,255,.28) 70%),
        url('../images/nalook-hall-interior.jpg') center 55%/cover no-repeat;
}

.auth-showcase:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 8% 9%, rgba(29, 185, 109, .15), transparent 28%);
}

.auth-showcase:after {
    content: "";
    position: absolute;
    left: -8%;
    right: -6%;
    bottom: -88px;
    height: 190px;
    border-radius: 50% 50% 0 0;
    background:
        linear-gradient(155deg, rgba(154, 222, 164, .82) 0 33%, rgba(0, 112, 66, .70) 34% 47%, rgba(0, 78, 48, .96) 48% 100%);
    box-shadow: 0 -32px 0 rgba(0, 134, 76, .20);
    transform: rotate(-3deg);
}

.showcase-copy {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.showcase-eyebrow {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 10px 18px;
    border: 1px solid #bfe2cc;
    border-radius: 999px;
    color: var(--auth-primary);
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 8px 20px rgba(13, 65, 42, .07);
    font-size: 16px;
    font-weight: 900;
}

.showcase-copy h1 {
    margin: 28px 0 22px;
    color: var(--auth-primary-deep);
    font-size: clamp(46px, 5.2vw, 68px);
    line-height: 1.08;
    letter-spacing: 0;
}

.register-showcase .showcase-copy h1 {
    font-size: clamp(39px, 4.1vw, 56px);
}

.register-showcase {
    display: grid;
    align-content: center;
    padding-top: 64px;
    padding-bottom: 118px;
}

.register-showcase .showcase-copy {
    max-width: 610px;
}

.showcase-copy em {
    display: inline-block;
    color: var(--auth-primary);
    background: var(--auth-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: normal;
}

.showcase-copy p {
    max-width: 540px;
    margin: 0;
    color: #2a3e54;
    font-size: 17px;
    line-height: 1.72;
}

.auth-trust-panel {
    position: absolute;
    z-index: 3;
    left: clamp(36px, 5vw, 86px);
    bottom: 136px;
    display: grid;
    gap: 24px;
    width: min(460px, calc(100% - 72px));
}

.auth-trust-panel article {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.trust-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 1px solid #dcece3;
    border-radius: 50%;
    color: var(--auth-primary);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 12px 26px rgba(13, 65, 42, .10);
}

.trust-icon svg {
    width: 28px;
    height: 28px;
}

.auth-trust-panel b,
.auth-trust-panel p {
    display: block;
}

.auth-trust-panel b {
    color: var(--auth-primary-dark);
    font-size: 16px;
    font-weight: 900;
}

.auth-trust-panel p {
    margin: 7px 0 0;
    color: #273d51;
    font-size: 13px;
    line-height: 1.45;
}

.register-trust-panel {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(520px, 100%);
    margin-top: 34px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.register-trust-panel article {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
}

.register-trust-panel .trust-icon {
    width: 50px;
    height: 50px;
}

.register-trust-panel .trust-icon svg {
    width: 22px;
    height: 22px;
}

.register-trust-panel b {
    font-size: 14px;
}

.register-trust-panel p {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.35;
}

.auth-form-side {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(var(--app-vh, 1vh) * 100 - 92px);
    padding: 50px clamp(30px, 5vw, 78px) 88px;
    background:
        radial-gradient(circle at 96% 12%, rgba(0, 134, 76, .08), transparent 23%),
        radial-gradient(circle at 0 100%, rgba(32, 191, 122, .10), transparent 25%),
        #fbfdfc;
}

.register-form-side {
    justify-content: center;
    padding: 42px clamp(30px, 3.4vw, 60px) 56px;
}

.auth-form-card {
    position: relative;
    z-index: 1;
    flex: 0 1 555px;
    width: 100%;
    max-width: 555px;
    padding: 42px 43px 38px;
    border: 1px solid #e2ebe6;
    border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--auth-shadow);
    text-align: center;
}

.register-form-card {
    flex-basis: auto;
    max-width: 820px;
    padding: 34px 36px 30px;
}

.auth-icon {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    border-radius: 50%;
    color: var(--auth-primary);
    background: radial-gradient(circle, #fff 0%, #dfeee6 100%);
}

.auth-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 2.3;
}

.register-form-card .auth-icon {
    width: 74px;
    height: 74px;
    margin-bottom: 16px;
}

.register-form-card .auth-icon svg {
    width: 34px;
    height: 34px;
}

.auth-form-card h1 {
    margin: 0 0 10px;
    color: var(--auth-primary-deep);
    font-size: 29px;
    line-height: 1.2;
}

.register-form-card h1 {
    font-size: 27px;
}

.auth-form-card > p {
    margin: 0;
    color: #4f5d72;
    font-size: 15px;
}

.auth-form-card form {
    margin-top: 33px;
    text-align: left;
}

.register-form-card form {
    margin-top: 24px;
}

.auth-form-card label,
.field-group label {
    display: block;
    margin: 0 0 10px;
    color: #07142b;
    font-size: 12px;
    font-weight: 900;
}

.required-label:after {
    content: " *";
    color: #d93636;
    font-weight: 900;
}

.auth-input {
    position: relative;
    margin-bottom: 23px;
}

.field-group .auth-input {
    margin-bottom: 15px;
}

.auth-input input,
.auth-input select {
    width: 100%;
    height: 58px;
    padding: 0 54px;
    border: 1px solid #cfd9e3;
    border-radius: 8px;
    color: #243448;
    background: #fff;
    box-shadow: inset 0 1px 0 #f7faf8;
    font-size: 15px;
    outline: 0;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.register-form-card .auth-input input,
.register-form-card .auth-input select {
    height: 54px;
    font-size: 13px;
}

.auth-input select {
    padding-left: 17px;
    appearance: auto;
}

.auth-input input::placeholder {
    color: #7b8795;
}

.auth-input:focus-within input,
.auth-input:focus-within select,
.file-input:focus-within {
    border-color: #81c99f;
    box-shadow: 0 0 0 4px rgba(0, 134, 76, .10);
}

.field-icon {
    position: absolute;
    z-index: 1;
    left: 18px;
    top: 50%;
    display: grid;
    place-items: center;
    color: #697687;
    transform: translateY(-50%);
}

.field-icon svg {
    width: 20px;
    height: 20px;
}

.password-toggle {
    position: absolute;
    z-index: 2;
    right: 11px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #697687;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: #f0f7f3;
}

.password-toggle.visible {
    color: var(--auth-primary);
}

.auth-input.is-valid input {
    border-color: #0b9d62;
    box-shadow: 0 0 0 4px rgba(11, 157, 98, .12);
}

.auth-input.is-invalid input {
    border-color: #d54d4d;
    box-shadow: 0 0 0 4px rgba(213, 77, 77, .12);
}

.auth-form-link {
    display: block;
    margin: -8px 0 28px;
    color: var(--auth-primary-dark);
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}

.auth-submit,
.auth-secondary,
.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-submit,
.auth-secondary {
    width: 100%;
    min-height: 58px;
    gap: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 900;
}

.auth-submit {
    border: 0;
    color: #fff;
    background: var(--auth-gradient);
    box-shadow: 0 14px 28px rgba(0, 112, 66, .23);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.auth-submit.secondary {
    color: var(--auth-primary-dark);
    border: 1px solid #b8d9c8;
    background: #fff;
    box-shadow: none;
}

.auth-submit:hover,
.auth-secondary:hover {
    transform: translateY(-2px);
}

.auth-submit:disabled {
    opacity: .72;
    cursor: wait;
    transform: none;
}

.auth-submit svg:last-child {
    margin-left: 8px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 25px 0;
    color: #7a8795;
    font-size: 12px;
    font-weight: 700;
}

.auth-divider:before,
.auth-divider:after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e4ebe7;
}

.auth-secondary {
    color: var(--auth-primary-dark);
    border: 1px solid #78c89d;
    background: #fff;
}

.auth-secondary span {
    display: grid;
    place-items: center;
}

.auth-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    max-width: 480px;
    width: 100%;
    margin: 25px auto 0;
    color: #566579;
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

.auth-legal svg {
    flex: 0 0 auto;
    color: var(--auth-primary);
}

.auth-legal a,
.auth-switch a,
.auth-consent a,
.auth-bottom-strip a {
    color: var(--auth-primary-dark);
    font-weight: 900;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}

.auth-form-grid .full {
    grid-column: 1 / -1;
}

.form-step {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.form-step[hidden] {
    display: none;
}

.register-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(42px, 72px) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: min(460px, 100%);
    margin: 22px auto 0;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: #758292;
    font-size: 12px;
    font-weight: 900;
}

.progress-step:last-child {
    justify-content: flex-end;
}

.progress-step b {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1px solid #cfd9e3;
    border-radius: 50%;
    color: #697687;
    background: #fff;
    font-size: 13px;
}

.progress-step small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-step.active,
.progress-step.complete {
    color: var(--auth-primary-dark);
}

.progress-step.active b,
.progress-step.complete b {
    border-color: transparent;
    color: #fff;
    background: var(--auth-gradient);
    box-shadow: 0 8px 18px rgba(0, 112, 66, .18);
}

.progress-track {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: #dce8e1;
}

.register-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 2px;
}

.register-actions .auth-submit {
    width: auto;
    min-width: 210px;
    padding-inline: 24px;
}

.register-actions.split {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.25fr);
}

.register-actions.split .auth-submit {
    width: 100%;
    min-width: 0;
}

.password-guide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: -4px 0 15px;
    padding: 0;
    list-style: none;
}

.password-guide li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.password-guide li {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #758292;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
}

.password-guide span {
    display: grid;
    place-items: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border: 1px solid #cfd9e3;
    border-radius: 50%;
    color: #8a98a8;
    background: #fff;
    font-size: 12px;
    font-weight: 900;
}

.password-guide span:before {
    content: "x";
}

.password-guide .passed {
    color: var(--auth-primary-dark);
}

.password-guide .passed span {
    border-color: #0b9d62;
    color: #fff;
    background: #0b9d62;
}

.password-guide .passed span:before {
    content: "";
    width: 7px;
    height: 4px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg) translate(1px, -1px);
}

.password-guide .failed span {
    border-color: #d54d4d;
    color: #d54d4d;
    background: #fff6f6;
}

.confirm-guide {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 18px;
    margin: -4px 0 15px;
    color: #758292;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
}

.confirm-guide span {
    display: grid;
    place-items: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border: 1px solid #cfd9e3;
    border-radius: 50%;
    color: #8a98a8;
    background: #fff;
    font-size: 12px;
    font-weight: 900;
}

.confirm-guide span:before {
    content: "x";
}

.confirm-guide.passed {
    color: var(--auth-primary-dark);
}

.confirm-guide.passed span {
    border-color: #0b9d62;
    color: #fff;
    background: #0b9d62;
}

.confirm-guide.passed span:before {
    content: "";
    width: 7px;
    height: 4px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg) translate(1px, -1px);
}

.confirm-guide.failed {
    color: #b83232;
}

.confirm-guide.failed span {
    border-color: #d54d4d;
    color: #d54d4d;
    background: #fff6f6;
}

.file-input {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 14px;
    border: 1px solid #cfd9e3;
    border-radius: 8px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.file-input input {
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 12px;
}

.file-input input::file-selector-button {
    margin-right: 10px;
    padding: 7px 11px;
    border: 1px solid #cfd9e3;
    border-radius: 6px;
    color: var(--auth-primary-dark);
    background: #f7fbf8;
    font-weight: 800;
    cursor: pointer;
}

.file-input small {
    color: #758292;
    font-size: 11px;
    white-space: nowrap;
}

.auth-consent {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 18px !important;
    color: #566579 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.5;
}

.auth-consent input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--auth-primary);
}

.auth-switch {
    margin: 0 !important;
    color: #566579 !important;
    font-size: 13px;
    text-align: center;
}

.auth-bottom-strip {
    position: static;
    z-index: 25;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 86px;
    color: #fff;
    background: var(--auth-gradient-deep);
    box-shadow: 0 -18px 42px rgba(0, 54, 33, .18);
}

.login-page-shell + .auth-bottom-strip {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
}

.auth-bottom-strip > div {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px clamp(24px, 5vw, 72px);
}

.auth-bottom-strip > div + div {
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, .28);
}

.auth-bottom-strip span {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

.auth-bottom-strip strong,
.auth-bottom-strip small,
.auth-bottom-strip a {
    display: block;
}

.auth-bottom-strip strong {
    font-size: 15px;
}

.auth-bottom-strip small,
.auth-bottom-strip a {
    margin-top: 4px;
    color: #e5f5eb;
    font-size: 13px;
}

.auth-bottom-strip a {
    display: inline;
    color: #65df90;
}

/* Post-login loading screen */
.login-loader {
    position: relative;
    display: grid;
    place-items: center;
    min-height: calc(var(--app-vh, 1vh) * 100);
    padding: 24px;
    overflow: hidden;
    color: var(--auth-primary-dark);
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.34)),
        url('../images/web.jpg') center/cover no-repeat;
}

.login-loader-card {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 12px;
    width: min(360px, calc(100vw - 42px));
    margin-top: min(48vh, 330px);
    color: var(--auth-primary-dark);
    text-shadow: 0 1px 0 #fff;
}

.login-loader-card strong {
    font-size: 18px;
    font-weight: 900;
}

.login-loader-card small {
    color: #176f52;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.login-loader-glow {
    position: absolute;
    inset: auto auto calc(100% + 14px);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .55), 0 16px 38px rgba(0, 106, 71, .16);
    animation: loader-pulse 1.35s ease-in-out infinite;
}

.login-loader-orbit {
    position: absolute;
    inset: auto auto calc(100% + 19px);
    width: 54px;
    height: 54px;
    border: 4px solid #d7eee2;
    border-top-color: var(--auth-primary);
    border-right-color: #8cd776;
    border-radius: 50%;
    animation: loader-spin .9s linear infinite;
}

.login-loader-bar {
    display: block;
    width: min(260px, 76vw);
    height: 7px;
    margin-top: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: #d9eee2;
    box-shadow: inset 0 1px 2px rgba(12, 96, 72, .10);
}

.login-loader-bar span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--auth-gradient);
    transform-origin: left;
    animation: loader-progress 3s linear forwards;
}

@keyframes loader-spin { to { transform: rotate(360deg); } }
@keyframes loader-pulse { 0%,100% { transform: scale(.92); opacity: .62; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes loader-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Base styles kept for resident portal selection; quick-action.css adds the detailed theme. */
.quick-action-page {
    min-height: 100vh;
}

.quick-action-header,
.quick-action-brand,
.quick-action-account,
.resident-menu summary,
.quick-greeting,
.portal-choice,
.portal-choice a,
.quick-action-footer,
.quick-action-footer nav {
    display: flex;
    align-items: center;
}

.quick-action-header {
    justify-content: space-between;
}

.quick-action-brand {
    gap: 15px;
    color: #101a54;
}

.quick-action-seal {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #fff;
}

.quick-action-seal img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.quick-action-brand-copy,
.resident-identity {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.quick-action-account {
    gap: 20px;
}

.resident-menu {
    position: relative;
}

.resident-menu summary {
    gap: 13px;
    list-style: none;
    cursor: pointer;
}

.resident-menu summary::-webkit-details-marker {
    display: none;
}

.resident-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-weight: 900;
}

.menu-chevron {
    width: 9px;
    height: 9px;
    border-right: 2px solid #52628d;
    border-bottom: 2px solid #52628d;
    transform: rotate(45deg) translateY(-3px);
}

.resident-menu-panel {
    position: absolute;
    z-index: 80;
    right: 0;
    top: 58px;
    background: #fff;
}

.resident-menu-panel a {
    display: block;
}

.quick-welcome {
    position: relative;
    overflow: hidden;
}

.quick-welcome-copy {
    position: relative;
    z-index: 1;
}

.portal-selection-grid {
    display: grid;
}

.portal-choice {
    position: relative;
    overflow: hidden;
}

.portal-choice-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #fff;
}

.document-icon,
.complaint-icon {
    position: relative;
    display: block;
}

.portal-choice-copy {
    position: relative;
    z-index: 1;
}

.portal-choice a {
    justify-content: space-between;
    background: #fff;
}

@media (max-width: 1024px) {
    .auth-showcase,
    .register-showcase {
        display: none !important;
    }

    .auth-page-shell,
    .login-page-shell,
    .register-page-shell {
        grid-template-columns: 1fr !important;
        min-height: calc(100vh - 74px) !important;
        padding: 88px 16px 40px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    .auth-form-side,
    .register-form-side {
        width: 100% !important;
        max-width: 440px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        min-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .register-form-side {
        max-width: 580px !important;
    }

    .auth-form-card,
    .login-form-card,
    .register-form-card {
        width: 100% !important;
        max-width: 440px !important;
        margin: 0 auto !important;
    }

    .register-form-card {
        max-width: 580px !important;
    }
}

@media (max-width: 760px) {
    .auth-topbar {
        height: 70px;
        padding-inline: 16px;
    }

    .auth-brand {
        gap: 10px;
    }

    .auth-brand strong {
        font-size: 15px;
    }

    .auth-brand small {
        font-size: 11px;
    }

    .auth-seal {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .back-home {
        font-size: 12px;
    }

    .auth-showcase,
    .register-showcase {
        display: none !important;
    }

    .showcase-eyebrow {
        padding: 8px 13px;
        font-size: 12px;
    }

    .showcase-copy h1,
    .register-showcase .showcase-copy h1 {
        margin: 20px 0 14px;
        font-size: 37px;
    }

    .showcase-copy p {
        font-size: 14px;
        line-height: 1.55;
    }

    .auth-trust-panel {
        position: static;
        width: auto;
        margin-top: 28px;
        gap: 16px;
    }

    .auth-trust-panel article {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 12px;
    }

    .trust-icon {
        width: 48px;
        height: 48px;
    }

    .trust-icon svg {
        width: 22px;
        height: 22px;
    }

    .auth-trust-panel b {
        font-size: 13px;
    }

    .auth-trust-panel p {
        font-size: 12px;
    }

    .auth-form-side {
        min-height: auto;
        padding: 24px 14px 32px;
        background: #f8fcfa;
    }

    .auth-form-card,
    .register-form-card {
        padding: 28px 19px;
        border-radius: 10px;
    }

    .auth-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 17px;
    }

    .auth-icon svg {
        width: 32px;
        height: 32px;
    }

    .auth-form-card h1 {
        font-size: 24px;
    }

    .auth-form-card > p {
        font-size: 13px;
    }

    .auth-form-card form {
        margin-top: 24px;
    }

    .auth-input {
        margin-bottom: 17px;
    }

    .auth-input input,
    .auth-input select {
        height: 51px;
        padding-inline: 46px 42px;
        font-size: 13px;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
    }

    .form-step {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-form-grid .full {
        grid-column: auto;
    }

    .register-progress {
        grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
        gap: 9px;
        margin-top: 18px;
    }

    .progress-step {
        gap: 7px;
        font-size: 11px;
    }

    .progress-step b {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }

    .register-actions,
    .register-actions.split {
        display: grid;
        grid-template-columns: 1fr;
    }

    .register-actions .auth-submit {
        width: 100%;
        min-width: 0;
    }

    .password-guide {
        grid-template-columns: 1fr;
    }

    .file-input {
        display: block;
    }

    .file-input small {
        display: block;
        margin-top: 8px;
        white-space: normal;
    }

    .auth-legal {
        align-items: flex-start;
        font-size: 12px;
    }

    .auth-bottom-strip,
    .login-page-shell + .auth-bottom-strip {
        position: static;
        grid-template-columns: 1fr;
    }

    .auth-bottom-strip > div {
        padding: 17px 18px;
    }

    .auth-bottom-strip > div + div {
        justify-content: flex-start;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .22);
    }

    .login-loader {
        background-image: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.24)), url('../images/mobile.jpg');
    }
}

@media (max-width: 430px) {
    .auth-brand span:last-child {
        max-width: 145px;
    }

    .auth-brand strong {
        font-size: 12px;
    }

    .auth-brand small {
        display: none;
    }

    .back-home {
        gap: 5px;
        font-size: 11px;
    }

    .back-home svg {
        width: 15px;
        height: 15px;
    }

    .showcase-copy h1,
    .register-showcase .showcase-copy h1 {
        font-size: 32px;
    }

    .auth-submit,
    .auth-secondary {
        min-height: 52px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .auth-topbar {
        padding-inline: 12px;
    }

    .auth-brand {
        gap: 7px;
    }

    .auth-seal {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .back-home {
        font-size: 10px;
    }

    .showcase-copy h1,
    .register-showcase .showcase-copy h1 {
        font-size: 29px;
    }

    .auth-form-side {
        padding-inline: 10px;
    }

    .auth-form-card,
    .register-form-card {
        padding-inline: 15px;
    }

    .auth-input input,
    .auth-input select {
        padding-inline: 42px 38px;
    }

    .auth-bottom-strip > div {
        padding-inline: 14px;
    }
}

@media (max-height: 760px) and (min-width: 1181px) {
    .auth-showcase {
        padding-top: 44px;
        padding-bottom: 160px;
    }

    .showcase-copy h1 {
        font-size: clamp(40px, 4.4vw, 58px);
    }

    .auth-trust-panel {
        bottom: 105px;
        gap: 16px;
    }

    .auth-form-card {
        padding-top: 32px;
        padding-bottom: 30px;
    }

    .auth-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 16px;
    }
}

/* FINAL auth pages light/dark appearance and responsive typography */
body.public,
body.public.auth,
body.public:has(.auth-page-shell) {
  --auth-page-bg: #ffffff;
  --auth-card-bg: rgba(255, 255, 255, 0.97);
  --auth-field-bg: #ffffff;
  --auth-heading-color: #071b13;
  --auth-body-color: #263a31;
  --auth-muted-color: #5c6e66;
  --auth-on-photo: #ffffff;
  --auth-on-photo-muted: rgba(255, 255, 255, 0.84);
  --auth-border-color: #d5e7dd;
}

html[data-theme="dark"] body.public,
html[data-theme="dark"] body.public.auth,
html[data-theme="dark"] body.public:has(.auth-page-shell) {
  --auth-page-bg: #06110c;
  --auth-card-bg: rgba(13, 31, 23, 0.97);
  --auth-field-bg: #071b13;
  --auth-heading-color: #ffffff;
  --auth-body-color: #e9f5ef;
  --auth-muted-color: #b8c9c0;
  --auth-on-photo: #ffffff;
  --auth-on-photo-muted: rgba(255, 255, 255, 0.84);
  --auth-border-color: rgba(76, 214, 151, 0.24);
}

body.public:has(.auth-page-shell),
.auth-page-shell {
  background: var(--auth-page-bg) !important;
  color: var(--auth-body-color) !important;
  font-size: 15px !important;
}

.auth-topbar {
  min-height: 88px !important;
  padding: 0 clamp(22px, 5vw, 76px) !important;
}

html[data-theme="light"] .auth-topbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom-color: rgba(17, 93, 56, 0.16) !important;
}

html[data-theme="dark"] .auth-topbar {
  background: rgba(7, 22, 16, 0.96) !important;
  border-bottom-color: rgba(76, 214, 151, 0.22) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35) !important;
}

.auth-brand {
  display: inline-grid !important;
  grid-template-columns: 58px minmax(0, max-content) !important;
  align-items: center !important;
  column-gap: 12px !important;
}

.auth-brand .auth-seal {
  grid-row: 1 / span 2 !important;
  margin: 0 !important;
}

.auth-brand strong {
  margin: 0 !important;
  color: var(--auth-heading-color) !important;
  -webkit-text-fill-color: var(--auth-heading-color) !important;
  font-size: clamp(21px, 1.6vw, 25px) !important;
  line-height: 1.08 !important;
  white-space: nowrap !important;
}

.auth-brand small,
.back-home {
  color: var(--auth-muted-color) !important;
  -webkit-text-fill-color: var(--auth-muted-color) !important;
  font-size: 13px !important;
}

.back-home {
  color: #20c879 !important;
  -webkit-text-fill-color: #20c879 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

.auth-showcase {
  background:
    linear-gradient(90deg, rgba(5, 20, 14, .32) 0%, rgba(5, 20, 14, .18) 35%, rgba(255, 255, 255, .16) 70%),
    url('../images/nalook-hall-interior.jpg') center 55%/cover no-repeat !important;
}

.auth-showcase:before {
  background:
    linear-gradient(90deg, rgba(255,255,255,.88) 0%, rgba(236,250,244,.70) 36%, rgba(255,255,255,.10) 100%),
    radial-gradient(circle at 8% 9%, rgba(29, 185, 109, .18), transparent 28%) !important;
}

html[data-theme="dark"] .auth-showcase:before {
  background:
    linear-gradient(90deg, rgba(5,17,12,.86) 0%, rgba(5,17,12,.60) 42%, rgba(5,17,12,.24) 100%),
    radial-gradient(circle at 8% 9%, rgba(57, 217, 139, .16), transparent 28%) !important;
}

.showcase-eyebrow {
  color: #0b7044 !important;
  -webkit-text-fill-color: #0b7044 !important;
  font-size: 15px !important;
}

html[data-theme="dark"] .showcase-eyebrow {
  background: rgba(12, 33, 24, 0.82) !important;
  border-color: rgba(75, 214, 151, 0.32) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.showcase-copy h1 {
  color: var(--auth-on-photo) !important;
  -webkit-text-fill-color: var(--auth-on-photo) !important;
  font-size: clamp(46px, 5.1vw, 70px) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.035em !important;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.22) !important;
}

.showcase-copy h1 em {
  color: #197a47 !important;
  background: linear-gradient(135deg, #0d5c38 0%, #197a47 55%, #388a1e 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}

html[data-theme="dark"] .showcase-copy h1 em {
  color: #39d98b !important;
  background: linear-gradient(135deg, #b8ffd6 0%, #39d98b 46%, #16b873 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.showcase-copy p,
.auth-trust-panel b,
.auth-trust-panel p {
  color: var(--auth-on-photo) !important;
  -webkit-text-fill-color: var(--auth-on-photo) !important;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.20) !important;
}

.showcase-copy p {
  font-size: clamp(16px, 1.25vw, 19px) !important;
}

.auth-trust-panel b {
  font-size: 16px !important;
}

.auth-trust-panel p {
  color: var(--auth-on-photo-muted) !important;
  -webkit-text-fill-color: var(--auth-on-photo-muted) !important;
  font-size: 13.5px !important;
}

.auth-form-side {
  background:
    radial-gradient(circle at 96% 12%, rgba(0, 134, 76, .08), transparent 23%),
    radial-gradient(circle at 0 100%, rgba(32, 191, 122, .10), transparent 25%),
    var(--auth-page-bg) !important;
}

.auth-form-card {
  background: var(--auth-card-bg) !important;
  border-color: var(--auth-border-color) !important;
  color: var(--auth-body-color) !important;
}

html[data-theme="dark"] .auth-form-card {
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45) !important;
}

.auth-form-card h1,
.auth-form-card h2,
.register-form-card h1 {
  color: var(--auth-heading-color) !important;
  -webkit-text-fill-color: var(--auth-heading-color) !important;
  font-size: clamp(27px, 2.4vw, 35px) !important;
  line-height: 1.15 !important;
}

.auth-form-card > p,
.auth-switch,
.auth-legal,
.auth-divider,
.progress-step,
.password-guide li,
.confirm-guide {
  color: var(--auth-muted-color) !important;
  -webkit-text-fill-color: var(--auth-muted-color) !important;
}

.auth-form-card label,
.field-group label {
  color: var(--auth-body-color) !important;
  -webkit-text-fill-color: var(--auth-body-color) !important;
  font-size: 12.5px !important;
  font-weight: 900 !important;
}

.auth-input input,
.auth-input select,
.auth-input textarea,
.file-input,
.file-input input {
  background: var(--auth-field-bg) !important;
  color: var(--auth-body-color) !important;
  -webkit-text-fill-color: var(--auth-body-color) !important;
  border-color: var(--auth-border-color) !important;
  font-size: 15px !important;
}

.auth-input input::placeholder,
.auth-input textarea::placeholder {
  color: var(--auth-muted-color) !important;
  -webkit-text-fill-color: var(--auth-muted-color) !important;
  opacity: 0.9 !important;
}

.field-icon,
.password-toggle,
.file-input small {
  color: var(--auth-muted-color) !important;
  -webkit-text-fill-color: var(--auth-muted-color) !important;
}

.auth-submit,
.auth-submit *,
.auth-secondary:hover,
.auth-secondary:hover * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.auth-secondary,
.auth-secondary * {
  color: #0b7044 !important;
  -webkit-text-fill-color: #0b7044 !important;
}

html[data-theme="dark"] .auth-secondary {
  background: transparent !important;
  border-color: rgba(57, 217, 139, 0.44) !important;
}

html[data-theme="dark"] .auth-secondary,
html[data-theme="dark"] .auth-secondary * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.auth-form-link,
.auth-legal a,
.auth-switch a,
.auth-consent a {
  color: #17b96f !important;
  -webkit-text-fill-color: #17b96f !important;
  font-weight: 900 !important;
}

.auth-bottom-strip {
  background: linear-gradient(135deg, #0d211a 0%, #125732 100%) !important;
  color: #ffffff !important;
}

.auth-bottom-strip strong,
.auth-bottom-strip a,
.auth-bottom-strip span,
.auth-bottom-strip svg {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.auth-bottom-strip small {
  color: rgba(255, 255, 255, 0.82) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.82) !important;
}

.progress-step.active,
.progress-step.complete {
  color: #17b96f !important;
  -webkit-text-fill-color: #17b96f !important;
}

.progress-step.active b,
.progress-step.complete b {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

@media (max-width: 1024px) {
  .auth-showcase,
  .register-showcase {
    display: none !important;
  }

  .auth-page-shell,
  .login-page-shell,
  .register-page-shell {
    grid-template-columns: 1fr !important;
    min-height: calc(100vh - 72px) !important;
    padding: 86px 16px 40px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    background: #f4f8f5 !important;
  }

  .auth-form-side,
  .register-form-side {
    width: 100% !important;
    max-width: 440px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    min-height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .register-form-side {
    max-width: 580px !important;
  }

  .auth-form-card,
  .login-form-card,
  .register-form-card {
    width: 100% !important;
    max-width: 440px !important;
    margin: 0 auto !important;
    padding: 30px 22px 26px !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 40px rgba(14, 34, 25, 0.08) !important;
    border: 1px solid rgba(25, 122, 71, 0.14) !important;
    background: #ffffff !important;
  }

  .register-form-card {
    max-width: 580px !important;
  }
}

@media (max-width: 760px) {
  .auth-topbar {
    min-height: 68px !important;
    padding-inline: 16px !important;
  }

  .auth-brand {
    gap: 10px !important;
  }

  .auth-brand strong {
    font-size: 16px !important;
    white-space: normal !important;
  }

  .auth-brand small,
  .back-home {
    font-size: 11.5px !important;
  }

  .auth-seal {
    width: 44px !important;
    height: 44px !important;
    flex-basis: 44px !important;
  }

  .auth-showcase,
  .register-showcase {
    display: none !important;
  }

  .form-step,
  .auth-form-grid {
    grid-template-columns: 1fr !important;
  }

  .auth-form-card,
  .register-form-card {
    padding: 26px 18px 22px !important;
  }

  .register-actions,
  .register-actions.split {
    grid-template-columns: 1fr !important;
    display: grid !important;
  }

  .register-actions .auth-submit {
    width: 100% !important;
    min-width: 0 !important;
  }

  .auth-bottom-strip {
    position: static !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 16px !important;
    margin-top: 24px !important;
    width: 100% !important;
    max-width: 580px !important;
    border-radius: 12px !important;
  }
}

/* Bulletproof Field Icon & Input Alignment for Login & Register */
body.public .auth-input,
.auth-input {
  position: relative !important;
  margin-bottom: 18px !important;
  width: 100% !important;
  display: block !important;
}

body.public .field-icon,
.field-icon {
  position: absolute !important;
  left: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #627b70 !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

body.public .field-icon svg,
.field-icon svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  fill: none !important;
  display: block !important;
}

body.public .auth-input input,
body.public .auth-input select,
.auth-input input,
.auth-input select {
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  padding-left: 48px !important;
  padding-right: 18px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border: 1.5px solid #cfded6 !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: normal !important;
  color: #17382d !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  transition: border-color .18s ease, box-shadow .18s ease !important;
}

body.public .auth-input.input-password input,
body.public .auth-input:has(.password-toggle) input,
.auth-input.input-password input,
.auth-input:has(.password-toggle) input {
  padding-right: 50px !important;
}

body.public .auth-input input::placeholder,
.auth-input input::placeholder {
  color: #8fa599 !important;
  font-size: 13.5px !important;
  opacity: 1 !important;
}

body.public .auth-input input:focus,
body.public .auth-input select:focus,
.auth-input input:focus,
.auth-input select:focus {
  border-color: #197a47 !important;
  box-shadow: 0 0 0 3.5px rgba(25, 122, 71, 0.14) !important;
  outline: none !important;
}

body.public .password-toggle,
.password-toggle {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  color: #627b70 !important;
  cursor: pointer !important;
  border-radius: 50% !important;
  z-index: 5 !important;
  padding: 0 !important;
}

body.public .password-toggle svg,
.password-toggle svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

body.public .password-toggle:hover,
.password-toggle:hover {
  background: #eef6f1 !important;
  color: #197a47 !important;
}

html[data-theme="dark"] body.public .auth-page-shell,
html[data-theme="dark"] body.public .login-page-shell,
html[data-theme="dark"] body.public .register-page-shell {
  background: #091712 !important;
}

html[data-theme="dark"] body.public .auth-form-card,
html[data-theme="dark"] body.public .login-form-card,
html[data-theme="dark"] body.public .register-form-card {
  background: #0f241d !important;
  border-color: #1c4538 !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] body.public .auth-input input,
html[data-theme="dark"] body.public .auth-input select {
  background: #0a1b15 !important;
  border-color: #1b4539 !important;
  color: #e5f6ed !important;
}

html[data-theme="dark"] body.public .auth-input input::placeholder {
  color: #7b9c8e !important;
}

html[data-theme="dark"] body.public .field-icon,
html[data-theme="dark"] body.public .password-toggle {
  color: #7b9c8e !important;
}

html[data-theme="dark"] body.public .auth-topbar {
  background: rgba(15, 36, 29, 0.95) !important;
  border-bottom-color: #1c4538 !important;
}

/* -------------------------------------------------------------
 * Registration Field Enhancements: Contact & Address Selector
 * ------------------------------------------------------------- */
.field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.field-header label {
    margin: 0 !important;
}

.btn-location-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #e7f7ed;
    color: #125732;
    border: 1px solid #b7dfc8;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-location-pill:hover {
    background: #d2f0dc;
    border-color: #81c99f;
    transform: translateY(-1px);
}

.btn-location-pill svg {
    width: 13px;
    height: 13px;
}

.field-note {
    display: block;
    margin: -10px 0 16px;
    font-size: 11px;
    color: #50675b;
    font-weight: 500;
}

.address-input-box {
    cursor: pointer;
}

.address-input-box input {
    cursor: pointer;
    padding-right: 18px;
}

/* Address Selector Dialog Modal */
.address-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(14, 34, 25, 0.65);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.address-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.address-modal-card {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #d1e2d8;
    box-shadow: 0 24px 64px rgba(14, 34, 25, 0.28);
    overflow: hidden;
    transform: translateY(18px) scale(0.98);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.address-modal-overlay.open .address-modal-card {
    transform: translateY(0) scale(1);
}

/* Live Map Component in Modal */
.address-map-container {
    margin-top: 14px;
    border: 1px solid #cfded5;
    border-radius: 10px;
    overflow: hidden;
    background: #f6faf7;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.address-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: #edf7f1;
    border-bottom: 1px solid #dcece2;
}

.address-map-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    color: #125732;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.address-map-title svg {
    width: 14px;
    height: 14px;
}

.address-map-hint {
    color: #50675b;
    font-size: 11px;
    font-weight: 500;
}

.address-dialog-map {
    height: 220px;
    width: 100%;
    z-index: 1;
}

.address-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #eef3f0;
    background: #ffffff;
}

.address-modal-header-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

.address-header-badge {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e5f6ed;
    color: #197a47;
    flex-shrink: 0;
}

.address-header-badge svg {
    width: 22px;
    height: 22px;
}

.address-modal-header-text h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #0e2219;
}

.address-modal-header-text p {
    margin: 2px 0 0;
    font-size: 12px;
    color: #50675b;
}

.address-modal-close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #697687;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.address-modal-close:hover {
    background: #f0f4f1;
    color: #0e2219;
}

.address-modal-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 11px 24px;
    background: #f6faf7;
    border-bottom: 1px solid #e8f0ec;
}

.btn-modal-gps {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: #ffffff;
    color: #125732;
    border: 1px solid #b7dfc8;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-modal-gps:hover {
    background: #e5f6ed;
    border-color: #81c99f;
}

.btn-modal-gps svg {
    width: 14px;
    height: 14px;
}

.gps-status-indicator {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gps-status-indicator.loading {
    background: #e8f0fe;
    color: #1a73e8;
}

.gps-status-indicator.success {
    background: #e6f4ea;
    color: #137333;
}

.gps-status-indicator.error {
    background: #fce8e6;
    color: #c5221f;
}

.address-modal-content {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.modal-input-group.full {
    grid-column: span 2;
}

.modal-input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #1d3329;
}

.modal-input-group label .required {
    color: #d93636;
}

.modal-input-group label small {
    color: #697687;
    font-weight: 500;
}

.modal-select-field,
.modal-text-field {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #cfd9e3;
    border-radius: 8px;
    font-size: 13px;
    color: #243448;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.modal-select-field:focus,
.modal-text-field:focus {
    border-color: #81c99f;
    box-shadow: 0 0 0 3px rgba(0, 134, 76, 0.12);
}

.address-preview-box {
    margin-top: 18px;
    padding: 14px 16px;
    background: #f4faf6;
    border: 1px solid #bce2cb;
    border-radius: 10px;
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #125732;
    margin-bottom: 6px;
}

.preview-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0b9d62;
    box-shadow: 0 0 0 3px rgba(11, 157, 98, 0.2);
}

.preview-output {
    font-size: 14px;
    font-weight: 600;
    color: #0e2219;
    line-height: 1.45;
}

.address-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 24px;
    background: #fafcfb;
    border-top: 1px solid #eef3f0;
}

.btn-dialog-cancel {
    padding: 9px 18px;
    background: #ffffff;
    color: #50675b;
    border: 1px solid #cfd9e3;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-dialog-cancel:hover {
    background: #f0f4f1;
    color: #1d3329;
}

.btn-dialog-confirm {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 22px;
    background: #197a47;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease;
}

.btn-dialog-confirm:hover {
    background: #125732;
}

.btn-dialog-confirm svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 620px) {
    .modal-form-grid {
        grid-template-columns: 1fr;
    }
    .modal-input-group.full {
        grid-column: span 1;
    }
}

