* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.auth-modern {
    margin: 0;
    color: #172033;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 16% 18%, rgba(37, 99, 235, 0.18), transparent 28rem),
        radial-gradient(circle at 88% 80%, rgba(15, 23, 42, 0.14), transparent 24rem),
        linear-gradient(135deg, #f8fbff 0%, #edf3fb 52%, #e7eef7 100%);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
    align-items: stretch;
}

.auth-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 5vw, 5rem);
    overflow: hidden;
}

.auth-hero::before {
    content: "";
    position: absolute;
    inset: 1.5rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.36);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
    pointer-events: none;
}

.auth-brand,
.auth-copy {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.auth-brand-mark {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(145deg, #2563eb, #0f172a);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 16px 28px rgba(29, 78, 216, 0.24);
}

.auth-brand strong {
    display: block;
    font-size: 1.2rem;
    line-height: 1;
}

.auth-brand small,
.auth-card-header p,
.auth-copy p {
    display: block;
    margin-top: 0.3rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-copy {
    max-width: 680px;
}

.auth-copy h1 {
    margin: 1rem 0 0;
    max-width: 12ch;
    color: #101827;
    font-size: clamp(2.8rem, 6vw, 5.7rem);
    font-weight: 950;
    line-height: 0.96;
    letter-spacing: 0;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 3rem);
    background: rgba(255, 255, 255, 0.72);
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.auth-panel > * {
    width: 100%;
    max-width: 430px;
}

.auth-card-header {
    margin-bottom: 1.6rem;
}

.auth-card-header h2 {
    margin: 0.4rem 0 0;
    color: #172033;
    font-size: 2rem;
    font-weight: 950;
    letter-spacing: 0;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-field {
    display: grid;
    gap: 0.45rem;
}

.auth-field label {
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-field input {
    width: 100%;
    min-height: 50px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font: inherit;
    padding: 0.85rem 1rem;
    outline: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.auth-field input:focus {
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.25rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #475569;
    font-size: 0.92rem;
    font-weight: 700;
}

.auth-check input {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

.auth-options a {
    color: #1d4ed8;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
}

.auth-options a:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 0.5rem;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(145deg, #2563eb, #173ea8);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 950;
    box-shadow: 0 18px 34px rgba(29, 78, 216, 0.25);
}

.auth-submit:hover {
    background: linear-gradient(145deg, #1d4ed8, #102f82);
}

.auth-status {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(15, 159, 110, 0.25);
    border-radius: 8px;
    background: rgba(15, 159, 110, 0.08);
    color: #047857;
    font-weight: 800;
}

.auth-error {
    margin: 0.25rem 0 0;
    padding-left: 1rem;
    color: #dc2626;
    font-size: 0.88rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: 34vh;
        padding: 1.25rem;
    }

    .auth-hero::before {
        inset: 0.75rem;
    }

    .auth-copy h1 {
        max-width: 14ch;
        font-size: clamp(2.2rem, 12vw, 4rem);
    }

    .auth-panel {
        align-items: start;
        border-left: 0;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
    }
}

@media (max-width: 520px) {
    .auth-options {
        align-items: flex-start;
        flex-direction: column;
    }
}
