:root {
    --blue: #075fff;
    --indigo: #5146e5;
    --ink: #0b1736;
    --muted: #66758f;
    --line: #dce6f5;
    --panel: #f4f8ff;
    --danger: #be123c;
    --success: #047857;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background: #ffffff;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

.hidden {
    display: none !important;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(440px, 0.9fr) minmax(520px, 1.1fr);
}

.login-brand-panel {
    min-height: 100vh;
    padding: clamp(34px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 12%, rgba(37, 123, 255, 0.55), transparent 34%),
        radial-gradient(circle at 88% 88%, rgba(103, 74, 230, 0.5), transparent 38%),
        linear-gradient(145deg, #071a47 0%, #0c2d75 46%, #18235d 100%);
}

.login-brand-panel::before,
.login-brand-panel::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    pointer-events: none;
}

.login-brand-panel::before {
    width: 420px;
    height: 420px;
    right: -220px;
    top: 15%;
}

.login-brand-panel::after {
    width: 620px;
    height: 620px;
    left: -390px;
    bottom: -390px;
}

.login-brand {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
}

.login-brand svg {
    width: 34px;
    height: 34px;
    padding: 5px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.96);
}

.login-brand strong {
    color: #86b8ff;
}

.brand-copy {
    max-width: 610px;
    position: relative;
    z-index: 1;
}

.brand-eyebrow {
    display: inline-block;
    margin-bottom: 20px;
    color: #87baff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.17em;
}

.brand-copy h1 {
    font-size: clamp(2rem, 3.2vw, 3.35rem);
    line-height: 1.32;
    letter-spacing: -0.05em;
}

.brand-copy p {
    max-width: 540px;
    margin-top: 24px;
    color: rgba(226, 237, 255, 0.76);
    font-size: 0.96rem;
    line-height: 1.9;
}

.security-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    position: relative;
    z-index: 1;
}

.security-points > div {
    min-width: 0;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}

.security-points > div > span {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #9bc8ff;
    background: rgba(87, 159, 255, 0.18);
    font-size: 0.68rem;
}

.security-points p {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.security-points strong {
    font-size: 0.78rem;
}

.security-points small {
    color: rgba(226, 237, 255, 0.64);
    font-size: 0.65rem;
    line-height: 1.5;
}

.login-form-panel {
    min-height: 100vh;
    padding: 48px;
    display: grid;
    place-items: center;
    position: relative;
    background:
        linear-gradient(rgba(7, 95, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(7, 95, 255, 0.025) 1px, transparent 1px),
        #fbfdff;
    background-size: 36px 36px;
}

.login-card {
    width: min(100%, 460px);
    padding: 40px;
    border: 1px solid rgba(7, 95, 255, 0.09);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 30px 80px rgba(30, 72, 140, 0.12);
}

.login-card-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.lock-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    box-shadow: 0 10px 24px rgba(7, 95, 255, 0.24);
    position: relative;
}

.lock-mark::before {
    content: '';
    width: 14px;
    height: 12px;
    position: absolute;
    top: 10px;
    left: 14px;
    border: 3px solid #ffffff;
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
}

.lock-mark::after {
    content: '';
    width: 21px;
    height: 17px;
    position: absolute;
    left: 12px;
    bottom: 9px;
    border: 3px solid #ffffff;
    border-radius: 5px;
}

.login-card-heading h2 {
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

.login-card-heading p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
}

.login-message {
    margin-bottom: 20px;
    padding: 11px 13px;
    border-radius: 9px;
    font-size: 0.78rem;
    line-height: 1.55;
}

.login-message.error {
    border: 1px solid #fecdd3;
    color: var(--danger);
    background: #fff1f2;
}

.login-message.success {
    border: 1px solid #a7f3d0;
    color: var(--success);
    background: #ecfdf5;
}

.login-message.info {
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    background: #eff6ff;
}

#adminLoginForm {
    display: grid;
    gap: 20px;
}

.login-field {
    display: grid;
    gap: 8px;
}

.login-field label {
    color: #263653;
    font-size: 0.82rem;
    font-weight: 700;
}

.input-shell {
    height: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-shell:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(7, 95, 255, 0.08);
}

.input-shell > span {
    color: #8fa1bc;
    font-weight: 800;
}

.input-shell input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font: inherit;
    font-size: 0.88rem;
}

.input-shell input::placeholder {
    color: #a1aec0;
}

.password-toggle {
    border: 0;
    color: var(--blue);
    background: transparent;
    font: inherit;
    font-size: 0.73rem;
    font-weight: 700;
    cursor: pointer;
}

.login-submit {
    height: 50px;
    margin-top: 4px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    box-shadow: 0 12px 26px rgba(7, 95, 255, 0.22);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(7, 95, 255, 0.28);
}

.login-submit:disabled {
    opacity: 0.66;
    cursor: wait;
}

.login-footnote {
    margin-top: 24px;
    padding-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border-top: 1px solid #edf1f7;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.6;
}

.back-home {
    width: fit-content;
    margin: 18px auto 0;
    display: block;
    color: #71819b;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
}

.back-home:hover {
    color: var(--blue);
}

@media (max-width: 980px) {
    .login-shell {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        grid-template-columns: 1fr;
        overflow-x: hidden;
    }

    .login-shell > *,
    .login-card,
    #adminLoginForm,
    .login-field,
    .input-shell {
        min-width: 0;
        max-width: 100%;
    }

    .login-brand-panel {
        min-height: auto;
        padding: 30px;
        gap: 42px;
    }

    .brand-copy h1 {
        font-size: 2rem;
    }

    .security-points {
        display: none;
    }

    .login-form-panel {
        min-height: auto;
        padding: 44px 20px;
    }

    .login-brand {
        min-height: 44px;
    }

    .input-shell input {
        min-height: 44px;
        font-size: 16px;
    }

    .password-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .back-home {
        min-height: 44px;
        padding: 10px 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .login-brand-panel {
        padding: 24px 20px 28px;
        gap: 30px;
    }

    .brand-copy h1 {
        font-size: 1.65rem;
    }

    .brand-copy p {
        margin-top: 14px;
        font-size: 0.82rem;
    }

    .login-form-panel {
        padding: 28px 14px;
    }

    .login-card {
        padding: 26px 20px;
        border-radius: 16px;
    }

}
