* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    color: #222433;
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(115deg, rgba(5, 5, 34, 0.28), rgba(5, 5, 34, 0.62)),
        url("/mawja_login_db_selector/static/src/img/login-background.jpg") center center / cover fixed no-repeat;
}

.gateway-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.gateway-card {
    width: 100%;
    max-width: 430px;
    padding: 34px 32px 30px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(10px);
}

.gateway-logo {
    padding-bottom: 22px;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 1px solid #dfe1e8;
}

.gateway-logo img {
    width: auto;
    max-width: 100%;
    max-height: 92px;
}

h1 {
    margin: 0 0 8px;
    color: #29243b;
    font-size: 27px;
    text-align: center;
}

.gateway-description,
.gateway-note {
    color: #626574;
    line-height: 1.45;
    text-align: center;
}

.gateway-description {
    margin: 0 0 25px;
}

.gateway-note {
    margin: 20px 0 0;
    font-size: 12px;
}

label {
    display: block;
    margin: 0 0 7px;
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    height: 44px;
    margin: 0 0 18px;
    padding: 0 12px;
    border: 1px solid #c9cbd4;
    border-radius: 6px;
    background: #fff;
    color: #222433;
    font-size: 15px;
}

input:focus {
    border-color: #a82686;
    outline: 3px solid rgba(168, 38, 134, 0.18);
}

button {
    width: 100%;
    height: 44px;
    margin-top: 4px;
    border: 0;
    border-radius: 6px;
    background: #a82686;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

button:hover,
button:focus {
    background: #87206c;
}

.gateway-button {
    display: flex;
    width: 100%;
    min-height: 46px;
    margin-top: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #a82686;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.gateway-button:hover,
.gateway-button:focus {
    background: #87206c;
}

.gateway-button-secondary {
    margin-top: 10px;
    border: 1px solid #a82686;
    background: #fff;
    color: #87206c;
}

.gateway-button-secondary:hover,
.gateway-button-secondary:focus {
    background: #f7edf5;
}

.environment-card {
    max-width: 520px;
}

.environment-badge {
    width: fit-content;
    margin: 0 auto 18px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #efe8f0;
    color: #6f2862;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.environment-database {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #ddd7e2;
    border-radius: 10px;
    background: #f9f7fa;
    text-align: center;
}

.environment-database span,
.environment-database small {
    display: block;
    color: #6c6873;
}

.environment-database span {
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.environment-database-name {
    display: block;
    overflow-wrap: anywhere;
    color: #29243b;
    font-size: 18px;
}

.environment-database small {
    margin-top: 8px;
    font-size: 11px;
}

.environment-test .environment-badge {
    background: #fff0d6;
    color: #9a4f00;
}

.environment-test .environment-database {
    border-color: #efb462;
    background: #fff8eb;
}

.environment-test .gateway-button {
    background: #d66b00;
}

.environment-test .gateway-button:hover,
.environment-test .gateway-button:focus {
    background: #ad5600;
}

.environment-missing {
    color: #9c2630;
}

.gateway-alert {
    margin: 0 0 18px;
    padding: 11px 12px;
    border: 1px solid #e5a3a9;
    border-radius: 6px;
    background: #fff0f1;
    color: #9c2630;
    font-size: 13px;
    line-height: 1.4;
}

.gateway-success {
    margin: 0 0 18px;
    padding: 11px 12px;
    border: 1px solid #8ac89c;
    border-radius: 6px;
    background: #eefaf1;
    color: #216c35;
    font-size: 13px;
    line-height: 1.4;
}

.maintenance-shell {
    align-items: flex-start;
}

.maintenance-card {
    max-width: 760px;
}

.maintenance-operation {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid #ddd7e2;
    border-radius: 10px;
    background: #f9f7fa;
}

.maintenance-operation h2 {
    margin: 0 0 8px;
    color: #29243b;
    font-size: 19px;
}

.maintenance-operation p {
    margin: 0 0 18px;
    color: #626574;
    line-height: 1.5;
}

.maintenance-warning {
    border-color: #e9ad57;
    background: #fff8eb;
}

.gateway-button-danger {
    background: #a13a24;
}

.gateway-button-danger:hover,
.gateway-button-danger:focus {
    background: #7f2d1d;
}

.gateway-link {
    display: block;
    margin-top: 22px;
    color: #87206c;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 575px) {
    body {
        background-attachment: scroll;
    }

    .gateway-card {
        padding: 28px 22px 24px;
    }
}
