:root {
    --bg-soft: #f4f8fc;
    --ink-strong: #0f2f44;
    --ink-mid: #446376;
    --brand-a: #0d9488;
    --brand-b: #0284c7;
    --accent: #f97316;
    --panel: #ffffff;
    --border-soft: #d6e6f0;
    --shadow-main: 0 28px 70px rgba(15, 47, 68, 0.16);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", "Trebuchet MS", "Lucida Sans Unicode", sans-serif;
    color: var(--ink-strong);
}

body {
    background:
        radial-gradient(circle at 12% 22%, rgba(13, 148, 136, 0.20) 0, transparent 42%),
        radial-gradient(circle at 88% 78%, rgba(2, 132, 199, 0.23) 0, transparent 39%),
        linear-gradient(130deg, #edf6fb 0%, #f8fbff 52%, #eef8f6 100%);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
    position: relative;
    overflow: hidden;
}

.login-signature {
    position: absolute;
    right: 18px;
    bottom: 12px;
    font-size: 0.75rem;
    color: rgba(15, 47, 68, 0.55);
    letter-spacing: 0.2px;
    user-select: none;
    pointer-events: none;
}

.login-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
    animation: floatOrb 9s ease-in-out infinite;
    pointer-events: none;
}

.login-orb-a {
    width: 280px;
    height: 280px;
    top: -60px;
    right: 8%;
    background: rgba(249, 115, 22, 0.19);
}

.login-orb-b {
    width: 320px;
    height: 320px;
    left: -90px;
    bottom: -80px;
    background: rgba(13, 148, 136, 0.18);
    animation-delay: 1.3s;
}

.login-grid {
    width: min(1080px, 100%);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    backdrop-filter: blur(9px);
    box-shadow: var(--shadow-main);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    overflow: hidden;
    animation: revealIn 500ms ease-out;
}

.brand-panel {
    padding: 44px 46px;
    background: linear-gradient(165deg, rgba(13, 148, 136, 0.08) 0%, rgba(2, 132, 199, 0.12) 52%, rgba(249, 115, 22, 0.11) 100%);
}

.badge-brand {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(15, 47, 68, 0.14);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #ffffff;
}

.brand-title {
    margin: 18px 0 10px;
    font-size: clamp(1.8rem, 2.7vw, 2.6rem);
    line-height: 1.1;
    max-width: 16ch;
}

.brand-subtitle {
    margin: 0 0 24px;
    color: var(--ink-mid);
    max-width: 46ch;
}

.brand-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 12px 14px;
    margin-top: 12px;
}

.logo-slot {
    width: 74px;
    height: 74px;
    min-width: 74px;
    min-height: 74px;
    flex-shrink: 0;
    border-radius: 14px;
    border: 1px dashed rgba(15, 47, 68, 0.3);
    display: grid;
    place-items: center;
    font-size: 10px;
    text-align: center;
    font-weight: 700;
    color: var(--ink-mid);
    background: #f9fdff;
    overflow: hidden;
}

.logo-slot img {
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    background: #fff;
    display: block;
    margin: 3px;
}

.logo-client {
    border-style: solid;
    border-color: rgba(249, 115, 22, 0.45);
}

.slot-title {
    font-size: 0.96rem;
    font-weight: 700;
}

.slot-text {
    font-size: 0.85rem;
    color: var(--ink-mid);
}

.auth-panel {
    background: var(--panel);
    padding: 44px 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-title {
    margin: 0;
    font-size: 1.7rem;
}

.auth-subtitle {
    margin: 6px 0 20px;
    color: var(--ink-mid);
}

.auth-input {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    min-height: 46px;
    box-shadow: none;
}

.auth-input:focus {
    border-color: rgba(2, 132, 199, 0.6);
    box-shadow: 0 0 0 0.18rem rgba(2, 132, 199, 0.18);
}

.auth-submit {
    min-height: 48px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--brand-a) 0%, var(--brand-b) 62%, var(--accent) 100%);
    color: #fff;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.23);
    filter: saturate(1.04);
}

.auth-submit:disabled {
    opacity: 0.86;
    cursor: wait;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    display: none;
    animation: spin 0.8s linear infinite;
}

.auth-submit.is-loading .btn-spinner {
    display: inline-block;
}

.auth-submit.is-loading .btn-text {
    opacity: 0.95;
}

.alert {
    border-radius: 12px;
    margin-bottom: 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes floatOrb {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(12px) scale(1.04);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes revealIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .login-grid {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        padding: 34px 24px 18px;
    }

    .auth-panel {
        padding: 24px;
    }

    .login-signature {
        right: 12px;
        bottom: 8px;
        font-size: 0.68rem;
    }
}
