* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 12px;
    background: #f1f5f9;
    color: #0f172a;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}
a { color: inherit; text-underline-offset: 4px; }

.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    min-height: calc(100vh - 24px);
}

.auth-panel {
    border-radius: 20px;
    background: #ffffff;
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
    overflow-y: auto;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
    color: #0f172a;
}
.auth-brand span {
    display: grid;
    place-items: center;
    background: #2563eb;
    color: white;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-weight: 800;
}

.auth-content {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    margin-block: auto;
    padding-block: 20px;
}

h1 {
    font-weight: 700;
    letter-spacing: -0.03em;
    font-size: 28px;
    line-height: 1.25;
    margin: 0 0 10px;
    color: #0f172a;
}

.auth-switch {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 28px;
    line-height: 1.5;
}
.auth-switch a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}
.auth-switch a:hover {
    text-decoration: underline;
}

button, input, summary { font: inherit; }

.provider, .email-option summary, .submit {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    border: 0;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.provider {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
}
.provider:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: #0f172a;
}
.google-svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #94a3b8;
    margin: 22px 0;
    font-size: 13px;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.email-option summary {
    display: grid;
    place-items: center;
    cursor: pointer;
    list-style: none;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
}
.email-option summary::-webkit-details-marker { display: none; }
.email-option summary:hover { background: #e2e8f0; }
.email-option[open] summary { margin-bottom: 20px; }

form { display: flex; flex-direction: column; }
label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}
input:not([type=hidden]):not([type=checkbox]) {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 10px 14px;
    background: #ffffff;
    font-size: 14px;
    margin-bottom: 16px;
    color: #0f172a;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:not([type=hidden]):not([type=checkbox]):focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
input[type=checkbox] {
    width: 17px !important;
    height: 17px !important;
    min-height: 17px !important;
    margin: 0;
    cursor: pointer;
    accent-color: #2563eb;
    flex-shrink: 0;
}

.submit {
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    margin-top: 6px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.submit:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.auth-panel footer {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: nowrap;
    white-space: nowrap;
    font-size: 13px;
    color: #64748b;
    padding-top: 16px;
}
.auth-panel footer a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}
.auth-panel footer a:hover {
    color: #2563eb;
    text-decoration: underline;
}
.auth-foot-sep {
    color: #cbd5e1;
    font-size: 11px;
    user-select: none;
}

.recaptcha-wrap {
    width: 100%;
    margin: 12px 0 16px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}
.g-recaptcha {
    transform-origin: center top;
}
@media (max-width: 440px) {
    .g-recaptcha {
        transform: scale(0.88);
        transform-origin: center top;
    }
}

.notice {
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Right Illustration Panel */
.auth-art {
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
}
.auth-art img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 72px);
    object-fit: contain;
    border-radius: 12px;
}

.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -4px 0 16px;
    font-size: 13px;
    gap: 12px;
}
.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    user-select: none;
}
.remember-label span {
    font-size: 13px;
    color: #475569;
}
.forgot-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    transition: color 0.15s ease, text-decoration 0.15s ease;
}
.forgot-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    body { padding: 0; background: #ffffff; }
    .auth-shell {
        grid-template-columns: 1fr;
        gap: 0;
        min-height: 100vh;
    }
    .auth-panel {
        border-radius: 0;
        border: 0;
        box-shadow: none;
        padding: 24px 20px;
        min-height: 100vh;
    }
    .auth-art {
        display: none !important;
    }
}
