:root {
    --auth-background: #ffffff;
    --auth-foreground: #252525;
    --auth-muted: #737373;
    --auth-border: #e5e5e5;
    --auth-field: #ffffff;
    --auth-primary: #252525;
    --auth-primary-foreground: #fafafa;
    --auth-radius: 10px;
}

:root.dark {
    --auth-background: #252525;
    --auth-foreground: #fafafa;
    --auth-muted: #a3a3a3;
    --auth-border: rgba(255, 255, 255, 0.1);
    --auth-field: #2f2f2f;
    --auth-primary: #dedede;
    --auth-primary-foreground: #252525;
}

html,
body {
    min-height: 100%;
    background: var(--auth-background);
    color: var(--auth-foreground);
}

body {
    margin: 0;
    font-family: "Sora", sans-serif;
}

.authentication-shell {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: var(--auth-background);
}

.authentication-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1rem;
    padding: 2.5rem;
}

.authentication-logo {
    margin: 0;
    text-align: left;
}

.authentication-logo .logo {
    display: inline-flex;
    align-items: center;
}

.authentication-logo img {
    display: block;
    width: auto;
    height: 50px;
    max-width: 180px;
    object-fit: contain;
}

.authentication-panel > .authentication {
    display: flex;
    flex: 1;
    min-height: 0;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: transparent;
}

.authentication-content {
    width: 100%;
    max-width: 320px;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.authentication-content::before {
    display: none;
}

.authentication-header {
    margin: 0 0 1.5rem;
    padding: 0;
    text-align: center;
}

.authentication-header .heading h1 {
    margin: 0;
    color: var(--auth-foreground);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
}

.authentication-header .description {
    margin-top: 0.35rem;
    color: var(--auth-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.authentication-form,
.authentication-content .form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.authentication-content .space-elements > * + * {
    margin-top: 0;
}

.authentication-content .form-group,
.authentication-content .moonshine-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0;
}

.authentication-content .form-group-inline {
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
}

.authentication-content .form-label {
    margin: 0;
    color: var(--auth-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
}

.authentication-content .form-input {
    width: 100%;
    min-height: 36px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--auth-border);
    border-radius: 7px;
    outline: 0;
    background: var(--auth-field);
    color: var(--auth-foreground);
    font: inherit;
    font-size: 0.875rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.authentication-content .form-input:focus {
    border-color: var(--auth-foreground);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-foreground) 12%, transparent);
}

.authentication-password-control {
    position: relative;
}

.authentication-password-control .form-input {
    padding-inline-end: 2.75rem;
}

.authentication-password-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 0.4rem;
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 150ms ease, color 150ms ease;
}

.authentication-password-toggle:hover {
    background: color-mix(in srgb, var(--auth-foreground) 6%, transparent);
    color: var(--auth-foreground);
}

.authentication-password-toggle:focus-visible {
    outline: 2px solid var(--auth-foreground);
    outline-offset: 1px;
}

.authentication-password-toggle svg {
    width: 1.125rem;
    height: 1.125rem;
}

.authentication-content .form-error {
    color: #dc2626;
    font-size: 0.75rem;
}

.authentication-field-help {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.625rem;
}

.authentication-alternative {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.75rem;
    text-align: center;
}

.authentication-alternative a {
    font-weight: 500;
    text-decoration: underline;
}

.authentication-recovery {
    margin-top: -0.45rem;
    text-align: right;
}

.authentication-recovery a {
    color: var(--auth-muted);
    font-size: 0.75rem;
}

.authentication-content .form-switcher-toggler {
    border-color: var(--auth-border);
    background: var(--auth-field);
}

.authentication-content .grid {
    display: block;
}

.authentication-content .mt-3 {
    margin-top: 0;
}

.authentication-content .btn {
    min-height: 36px;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    box-shadow: none;
}

.authentication-content .btn-primary {
    border-color: var(--auth-primary);
    background: var(--auth-primary);
    color: var(--auth-primary-foreground);
}

.authentication-content .btn-primary:hover {
    opacity: 0.9;
}

.authentication-content .btn-outline,
.authentication-content .btn-secondary {
    border-color: var(--auth-border);
    background: var(--auth-background);
    color: var(--auth-foreground);
}

.authentication-content .btn-outline:hover,
.authentication-content .btn-secondary:hover {
    background: color-mix(in srgb, var(--auth-foreground) 5%, var(--auth-background));
}

.authentication-content a {
    color: var(--auth-foreground);
    text-underline-offset: 4px;
}

.authentication-content .alert {
    margin-bottom: 1rem;
    border-radius: var(--auth-radius);
}

.authentication-actions {
    display: grid;
    gap: 0.75rem;
}

.authentication-actions form {
    width: 100%;
}

.authentication-showcase {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background: #000000;
}

.authentication-showcase img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1023px) {
    .authentication-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .authentication-showcase {
        display: none;
    }

    .authentication-panel {
        padding: 1.5rem;
    }

    .authentication-logo {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .authentication-panel {
        padding: 1rem;
    }

    .authentication-logo img {
        height: 44px;
        max-width: 160px;
    }

    .authentication-panel > .authentication {
        align-items: flex-start;
        padding-top: 12vh;
    }

    .authentication-content {
        max-width: 100%;
    }
}
