.tenant-header {
    border-bottom: 1px solid rgba(203, 213, 225, 0.72);
    background: #ffffff;
}

.tenant-header__inner {
    width: min(1120px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.tenant-header__logo {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-radius: var(--og-border-radius-sm);
    background: #ffffff;
}

.tenant-header__logo img {
    max-width: 34px;
    max-height: 34px;
}

.tenant-header__info strong {
    display: block;
    color: #102033;
    font-size: 16px;
}

.tenant-header__info p {
    margin: 2px 0 0;
    color: var(--og-color-gray-500);
    font-size: 13px;
}

.tenant-summary,
.tenant-login-summary {
    position: relative;
    z-index: 1;
    width: min(960px, calc(100% - 32px));
    margin: 24px auto 0;
    padding: 18px 20px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-left: 4px solid var(--og-color-primary);
    border-radius: var(--og-border-radius-sm);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.tenant-summary h1,
.tenant-login-summary strong {
    display: block;
    margin: 0;
    color: #102033;
    font-size: 20px;
    font-weight: 800;
}

.tenant-summary p,
.tenant-login-summary p {
    margin: 5px 0 0;
    color: var(--og-color-gray-500);
    font-size: 14px;
}

.tenant-access-portal {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 54px 16px 16px;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(239, 244, 249, 0.98)),
        repeating-linear-gradient(0deg, transparent 0 17px, rgba(15, 23, 42, 0.03) 17px 18px),
        repeating-linear-gradient(90deg, transparent 0 17px, rgba(15, 23, 42, 0.03) 17px 18px);
    color: #102033;
}

.tenant-access-topbar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #00008b;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.tenant-access-portal .btn-primary {
    --bs-btn-bg: var(--tenant-primary);
    --bs-btn-border-color: var(--tenant-primary);
    --bs-btn-hover-bg: #083f7d;
    --bs-btn-hover-border-color: #083f7d;
    min-height: 42px;
    border-radius: 6px;
    font-weight: 800;
}

.tenant-access-portal .btn-outline-primary {
    --bs-btn-color: var(--tenant-primary);
    --bs-btn-border-color: #b8c8da;
    --bs-btn-hover-bg: var(--tenant-primary);
    --bs-btn-hover-border-color: var(--tenant-primary);
    min-height: 38px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
}

.tenant-access-shell {
    width: min(900px, 100%);
}

.tenant-access-shell__main {
    display: block;
}

.tenant-login-panel,
.tenant-quick-panel,
.tenant-compact-notices,
.tenant-access-footer {
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.tenant-login-panel {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.05fr);
    align-items: center;
    gap: 28px;
    padding: 28px 32px;
}

.tenant-login-panel__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 310px;
    padding: 18px;
    border-right: 1px solid rgba(203, 213, 225, 0.72);
    text-align: center;
}

.tenant-login-panel__seal {
    width: 250px;
    height: 206px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.tenant-login-panel__seal img {
    max-width: 246px;
    max-height: 202px;
}

.tenant-login-panel__form {
    width: 100%;
}

.tenant-login-panel__form h2 {
    margin: 0 0 14px;
    color: #102033;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0;
}

.tenant-login-panel .form-label {
    color: #102033;
    font-size: 13px;
    font-weight: 700;
}

.tenant-login-panel .form-control {
    min-height: 42px;
    border-color: #cbd5e1;
    border-radius: 6px;
}

.tenant-login-panel .form-control:focus {
    border-color: var(--tenant-primary);
    box-shadow: 0 0 0 0.2rem rgba(11, 79, 156, 0.14);
}

.tenant-login-panel__submit {
    margin-top: 2px;
}

.tenant-login-panel__forgot {
    margin: -4px 0 10px;
    text-align: right;
}

.tenant-login-panel__certificate {
    margin-bottom: 12px;
    color: #475569;
    font-size: 13px;
}

.tenant-login-panel__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 0;
}

.tenant-login-panel__forgot a,
.tenant-login-panel__actions a,
.tenant-shortcuts a,
.tenant-access-footer a {
    color: var(--tenant-primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.tenant-login-panel__forgot a:hover,
.tenant-login-panel__actions a:hover,
.tenant-shortcuts a:hover,
.tenant-access-footer a:hover {
    text-decoration: underline;
}

.tenant-login-panel__actions .btn {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 13px;
}

.tenant-quick-panel {
    margin-top: 12px;
    padding: 12px;
}

.tenant-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.tenant-metrics article {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 6px;
    background: #f8fafc;
    text-align: center;
}

.tenant-metrics strong {
    color: var(--tenant-primary);
    font-size: 22px;
    line-height: 1;
}

.tenant-metrics span {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.tenant-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.tenant-shortcuts a {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 8px;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 6px;
    background: #f8fafc;
    text-align: center;
}

.tenant-compact-notices {
    width: min(680px, 100%);
    margin: 12px auto 0;
    padding: 12px 16px;
    text-align: center;
}

.tenant-compact-notices h2 {
    margin: 0 0 4px;
    color: #102033;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
}

.tenant-compact-notices p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.tenant-access-footer {
    min-height: 42px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    margin-top: 12px;
    padding: 9px 14px;
    color: #64748b;
    font-size: 12px;
}

.tenant-access-footer span {
    color: #64748b;
}

.municipal-page {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 46px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.96)),
        radial-gradient(circle at 18% 22%, rgba(11, 79, 156, 0.12), transparent 28%),
        radial-gradient(circle at 82% 30%, rgba(31, 122, 77, 0.1), transparent 30%),
        repeating-linear-gradient(0deg, transparent 0 15px, rgba(15, 23, 42, 0.035) 15px 16px),
        repeating-linear-gradient(90deg, transparent 0 15px, rgba(15, 23, 42, 0.035) 15px 16px);
}

.municipal-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(110deg, transparent 0 34%, rgba(11, 79, 156, 0.07) 34% 35%, transparent 35% 100%),
        linear-gradient(115deg, transparent 0 58%, rgba(31, 122, 77, 0.07) 58% 59%, transparent 59% 100%);
}

.municipal-page::after {
    content: "";
    position: absolute;
    top: -160px;
    right: -130px;
    width: 420px;
    height: 420px;
    z-index: 0;
    pointer-events: none;
    border: 1px solid rgba(11, 79, 156, 0.1);
    border-radius: 50%;
    box-shadow:
        -120px 140px 0 -65px rgba(31, 122, 77, 0.1),
        -250px 70px 0 -110px rgba(143, 31, 35, 0.1);
}

.municipal-selector {
    position: relative;
    z-index: 1;
    width: min(960px, calc(100% - 32px));
    min-height: 350px;
    margin: 70px auto 0;
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.05fr);
    border: 1px solid rgba(203, 213, 225, 0.68);
    border-radius: var(--og-border-radius-md);
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.88)),
        rgba(255, 255, 255, 0.88);
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    backdrop-filter: blur(14px);
}

.municipal-logo-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    min-height: 350px;
    padding: 40px;
    border-right: 1px solid rgba(203, 213, 225, 0.6);
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(241, 245, 249, 0.5)),
        linear-gradient(90deg, transparent, rgba(11, 79, 156, 0.035));
    text-align: center;
}

.municipal-logo-panel img {
    width: min(430px, 96%);
    filter: drop-shadow(0 16px 24px rgba(15, 23, 42, 0.13));
}

.municipal-logo-panel p {
    max-width: 360px;
    margin: 0;
    color: var(--og-color-gray-500);
    font-size: 15px;
}

.municipal-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px 42px 42px 48px;
    background: rgba(255, 255, 255, 0.42);
}

.municipal-form h1 {
    margin: 0 0 28px;
    color: #102033;
    font-size: 22px;
    font-weight: 800;
    text-align: left;
}

.field-group {
    margin-bottom: 16px;
}

.field-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--og-color-black);
    font-size: 13px;
    font-weight: 700;
}

.field-group select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: var(--og-border-radius-sm);
    background: var(--og-color-white);
    color: #102033;
    padding: 8px 12px;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.field-group select:focus {
    border-color: var(--og-color-primary);
    outline: 3px solid rgba(11, 79, 156, 0.14);
}

.field-group select:disabled {
    background: #f3f4f6;
    color: #8a8f98;
}

.municipal-form button {
    width: 100%;
    min-height: 44px;
    align-self: stretch;
    margin-top: 2px;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #0b4f9c, #1f7a4d);
    color: var(--og-color-white);
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(11, 79, 156, 0.18);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.municipal-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(11, 79, 156, 0.22);
}

.municipal-form__message {
    min-height: 20px;
    margin: 10px 0 0;
    color: var(--og-color-danger);
    font-size: 13px;
    text-align: left;
}

.municipal-footer {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-top: 1px solid var(--og-border-color);
    background:
        linear-gradient(rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.93)),
        repeating-linear-gradient(0deg, transparent 0 15px, rgba(15, 23, 42, 0.035) 15px 16px),
        repeating-linear-gradient(90deg, transparent 0 15px, rgba(15, 23, 42, 0.035) 15px 16px);
}

.municipal-footer p {
    margin: 0;
    color: var(--og-color-black);
    font-size: 13px;
}

@media (max-width: 780px) {
    .tenant-access-portal {
        display: block;
        padding: 12px;
    }

    .tenant-access-shell__main {
        grid-template-columns: 1fr;
    }

    .tenant-login-panel {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }

    .tenant-login-panel__brand {
        min-height: 0;
        padding: 0 0 16px;
        border-right: 0;
        border-bottom: 1px solid rgba(203, 213, 225, 0.72);
    }

    .tenant-login-panel__seal {
        width: 190px;
        height: 156px;
    }

    .tenant-login-panel__seal img {
        max-width: 186px;
        max-height: 152px;
    }

    .tenant-metrics,
    .tenant-shortcuts {
        grid-template-columns: 1fr;
    }

    .tenant-compact-notices {
        padding: 16px;
    }

    .tenant-header__inner {
        align-items: flex-start;
        padding: 12px 0;
    }

    .tenant-summary,
    .tenant-login-summary {
        margin-top: 16px;
    }

    .tenant-summary h1,
    .tenant-login-summary strong {
        font-size: 18px;
    }

    .municipal-selector {
        grid-template-columns: 1fr;
        margin-top: 24px;
    }

    .municipal-logo-panel {
        min-height: 210px;
        border-right: 0;
        border-bottom: 1px solid var(--og-border-color);
    }

    .municipal-form {
        padding: 26px 18px;
    }

    .municipal-form h1 {
        text-align: left;
    }

    .municipal-form button {
        width: 100%;
        align-self: stretch;
    }

    .municipal-form__message {
        text-align: left;
    }
}
