/* Identity & access public auth screens. */
.api-auth-page {
    min-height: 100vh;
    background: #f6f8fb;
}

.api-auth-topbar {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    right: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(246, 248, 245, 0.88);
    backdrop-filter: blur(18px);
}

.api-auth-topbar-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.api-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #17212b;
    font-size: 16px;
    font-weight: 800;
}

.api-auth-brand:hover {
    color: #17212b;
}

.api-auth-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #057f78, #4fb06d);
    box-shadow: 0 10px 24px rgba(5, 127, 120, 0.24);
    font-size: 16px;
    line-height: 1;
    font-weight: 900;
}

.api-auth-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #44515f;
    font-size: 14px;
    font-weight: 650;
}

.api-auth-nav a {
    color: inherit;
}

.api-auth-nav a:hover {
    color: #057f78;
}

.api-auth-main {
    width: min(100% - 32px, 440px);
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 48px;
}

.api-auth-card {
    width: 100%;
    border-radius: 8px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.94);
}

.api-auth-form {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.api-auth-field {
    display: grid;
    gap: 7px;
    color: var(--api-text);
    font-size: 13px;
    font-weight: 800;
}

.api-auth-field span {
    color: var(--api-muted);
}

.api-auth-field input[type="text"],
.api-auth-field input[type="password"] {
    width: 100%;
    min-height: 42px;
}

.api-auth-domain-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.api-auth-domain-field input[type="text"] {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.api-auth-domain-field > span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--api-control-border);
    border-left: 0;
    border-radius: 0 9px 9px 0;
    background: #f8fafc;
    color: var(--api-muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.api-auth-domain-field input[type="text"]:disabled + span {
    opacity: 0.68;
}

.api-auth-form .api-button {
    width: 100%;
    min-height: 42px;
    justify-content: center;
}

.api-auth-form .api-muted {
    text-align: center;
}

.identity-auth-return-link-zero {
    margin: 0;
}

.identity-auth-return-link-top {
    margin-top: 16px;
}

.identity-auth-return-link-block {
    margin: 16px 0 0;
}

.identity-auth-logout-main {
    max-width: 520px;
    margin: 8vh auto;
}

@media (max-width: 560px) {
    .api-auth-topbar-inner {
        min-height: 64px;
    }

    .api-auth-nav {
        gap: 14px;
        font-size: 13px;
    }

    .api-auth-nav a:not(:last-child) {
        display: none;
    }

    .api-auth-main {
        width: min(100% - 24px, 440px);
        padding: 96px 0 24px;
    }

    .api-auth-card {
        padding: 22px;
    }
}
