/* Auth screens aligned with the PsicoSense app shell */
:root {
    --auth-background: #f7f7f8;
    --auth-surface: #ffffff;
    --auth-surface-muted: #f3f4f6;
    --auth-text: #111827;
    --auth-text-soft: #4b5563;
    --auth-text-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-primary: #059669;
    --auth-primary-dark: #047857;
    --auth-coral: #f27d61;
    --auth-teal: #79bfca;
    --auth-shadow: 0 18px 45px rgba(17, 24, 39, 0.10);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(121, 191, 202, 0.22), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(242, 125, 97, 0.18), transparent 30rem),
        var(--auth-background);
    color: var(--auth-text);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 3vw, 2rem);
}

.auth-card {
    width: min(960px, 100%);
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(320px, 1fr);
    overflow: hidden;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    box-shadow: var(--auth-shadow);
}

.auth-card.compact {
    width: min(860px, 100%);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    min-height: 100%;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background:
        linear-gradient(145deg, rgba(5, 150, 105, 0.10), rgba(121, 191, 202, 0.18)),
        #ffffff;
    border-right: 1px solid var(--auth-border);
}

.auth-logo {
    display: block;
    width: min(190px, 78%);
    height: auto;
}

.auth-brand-copy {
    max-width: 23rem;
}

.auth-kicker {
    margin: 0 0 0.75rem;
    color: var(--auth-primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.auth-brand h1 {
    margin: 0;
    color: var(--auth-text);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.08;
    font-weight: 700;
}

.auth-brand p,
.auth-footer p {
    margin: 0;
    color: var(--auth-text-soft);
    line-height: 1.55;
}

.auth-accent-line {
    width: 8.5rem;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--auth-coral), var(--auth-teal), var(--auth-primary));
}

.auth-panel {
    padding: clamp(1.5rem, 4vw, 2.75rem);
}

.auth-panel-header {
    margin-bottom: 1.5rem;
}

.auth-panel-header h2 {
    margin: 0 0 0.4rem;
    color: var(--auth-text);
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    line-height: 1.18;
}

.auth-panel-header p {
    margin: 0;
    color: var(--auth-text-muted);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--auth-text);
    font-size: 0.93rem;
    font-weight: 650;
}

.form-control {
    width: 100%;
    min-height: 46px;
    padding: 0.75rem 0.875rem;
    color: var(--auth-text);
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14);
}

.help-text {
    margin-top: 0.35rem;
    color: var(--auth-text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.auth-button {
    width: 100%;
    min-height: 48px;
    margin-top: 0.35rem;
    padding: 0.8rem 1rem;
    border: 0;
    border-radius: 8px;
    background: var(--auth-primary);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-button:hover {
    background: var(--auth-primary-dark);
    box-shadow: 0 10px 22px rgba(5, 150, 105, 0.22);
    transform: translateY(-1px);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-footer {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--auth-border);
    text-align: center;
}

.auth-footer p + p {
    margin-top: 0.65rem;
}

.auth-link {
    color: var(--auth-primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.messages,
.error-message,
.errorlist {
    margin: 0 0 1rem;
}

.message,
.error-message,
.errorlist li {
    padding: 0.8rem 0.9rem;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.message.warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.message.error,
.error-message,
.errorlist li {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.errorlist {
    list-style: none;
    padding: 0;
}

.error-text {
    margin-top: 0.35rem;
    color: #b91c1c;
    font-size: 0.84rem;
}

.visually-hidden-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 760px) {
    .auth-page {
        align-items: start;
    }

    .auth-card,
    .auth-card.compact {
        grid-template-columns: 1fr;
        width: min(480px, 100%);
    }

    .auth-brand {
        gap: 1.25rem;
        border-right: 0;
        border-bottom: 1px solid var(--auth-border);
    }

    .auth-logo {
        width: 150px;
    }
}
