:root {
    --auth-primary: #487fff;
    --auth-primary-dark: #3468da;
    --auth-text: #111827;
    --auth-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-surface: #f8fafc;
}

* {
    box-sizing: border-box;
}

body.auth-public {
    margin: 0;
    min-width: 320px;
    color: var(--auth-text);
    background: #fff;
    font-family: "Segoe UI", sans-serif;
}

.auth-split {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(420px, 1fr) minmax(480px, 1fr);
}

.auth-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 48px;
    background: linear-gradient(145deg, #eef4ff 0%, #e8f0ff 54%, #f7faff 100%);
}

.auth-visual img {
    width: min(82%, 620px);
    height: auto;
}

.auth-panel {
    display: flex;
    align-items: center;
    padding: 48px 32px;
}

.auth-content {
    width: min(100%, 464px);
    margin: auto;
}

.auth-logo {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    margin-bottom: 36px;
    color: var(--auth-primary);
    font-size: 1.6rem;
    text-decoration: none;
}

.auth-logo img {
    display: block;
    width: 290px;
    max-width: 100%;
    height: 76px;
    object-fit: contain;
    object-position: left center;
}

.auth-public h1 {
    margin: 0 0 12px;
    font-size: clamp(1.55rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
}

.auth-description {
    margin: 0 0 30px;
    color: var(--auth-muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-field {
    position: relative;
}

.auth-field .form-control {
    min-height: 56px;
    padding: 14px 48px 14px 46px;
    border-color: var(--auth-border);
    border-radius: 12px;
    background: var(--auth-surface);
    box-shadow: none;
}

.auth-field .form-control:focus {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgb(72 127 255 / 14%);
}

.auth-field-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 16px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: #7c8798;
    pointer-events: none;
}

.auth-field-icon[data-icon="user"]::before {
    position: absolute;
    top: 0;
    left: 5px;
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    content: "";
}

.auth-field-icon[data-icon="user"]::after {
    position: absolute;
    bottom: 0;
    left: 2px;
    width: 14px;
    height: 8px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    content: "";
}

.auth-field-icon[data-icon="email"]::before {
    position: absolute;
    top: -4px;
    left: 0;
    content: "@";
    font-size: 20px;
    font-weight: 700;
}

.auth-field-icon[data-icon="lock"]::before {
    position: absolute;
    bottom: 0;
    left: 2px;
    width: 14px;
    height: 11px;
    border: 2px solid currentColor;
    border-radius: 3px;
    content: "";
}

.auth-field-icon[data-icon="lock"]::after {
    position: absolute;
    top: 0;
    left: 5px;
    width: 8px;
    height: 9px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    content: "";
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 30px;
    height: 30px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #7c8798;
}

.auth-password-toggle::before {
    position: absolute;
    top: 8px;
    left: 7px;
    width: 16px;
    height: 12px;
    transform: rotate(45deg);
    border: 2px solid currentColor;
    border-radius: 70% 0 70% 0;
    content: "";
}

.auth-password-toggle::after {
    position: absolute;
    top: 13px;
    left: 13px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.auth-form .btn-primary {
    min-height: 48px;
    border-color: var(--auth-primary);
    border-radius: 12px;
    background: var(--auth-primary);
    font-weight: 600;
}

.auth-form .btn-primary:hover,
.auth-form .btn-primary:focus {
    border-color: var(--auth-primary-dark);
    background: var(--auth-primary-dark);
}

.auth-form .btn-secondary {
    min-height: 48px;
    border-radius: 12px;
    color: #fff;
}

.auth-options,
.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--auth-muted);
    font-size: .92rem;
}

.auth-footer {
    justify-content: center;
    margin-top: 8px;
    text-align: center;
}

.auth-public a {
    color: var(--auth-primary-dark);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 0;
    color: var(--auth-muted);
    font-size: .9rem;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    background: var(--auth-border);
    content: "";
}

.auth-social {
    display: flex;
    gap: 12px;
}

.auth-social .btn {
    min-height: 48px;
    flex: 1;
    border-radius: 12px;
    font-weight: 600;
}

.auth-social .btn[disabled] {
    opacity: .65;
}

.auth-terms {
    margin: 0;
    color: var(--auth-muted);
    font-size: .88rem;
    line-height: 1.55;
}

.auth-card-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 15% 15%, rgb(72 127 255 / 13%), transparent 34%),
        #f6f7fb;
}

.auth-card {
    width: min(100%, 500px);
    padding: 36px;
    border: 1px solid rgb(17 24 39 / 6%);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 45px rgb(15 23 42 / 10%);
}

.auth-logo--card {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-logo--card img {
    object-position: center;
}

.auth-card h1,
.auth-card .auth-description {
    text-align: center;
}

.auth-card .auth-field .form-control {
    padding-left: 16px;
}

.auth-card .auth-field-icon {
    display: none;
}

.auth-card .auth-footer {
    justify-content: space-between;
    margin-top: 20px;
}

@media (max-width: 991.98px) {
    .auth-split {
        display: block;
    }

    .auth-visual {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 32px 20px;
    }
}

@media (max-width: 575.98px) {
    .auth-logo {
        margin-bottom: 28px;
    }

    .auth-card {
        padding: 28px 20px;
    }

    .auth-card .auth-footer,
    .auth-options {
        align-items: flex-start;
        flex-direction: column;
    }
}
