/* ============= NexysRAG Auth Pages — Shared Styles ============= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:root {
    --bg: #f7f8fc;
    --card: #ffffff;
    --border: #e5e7eb;
    --border-focus: #6366f1;
    --text: #111827;
    --text-2: #4b5563;
    --text-3: #9ca3af;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-soft: rgba(99, 102, 241, 0.08);
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --radius: 12px
}

html {
    height: 100%
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased
}

/* Layout */
.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px
}

.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
    animation: authIn .5s ease
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 32px
}

.auth-logo a {
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px
}

.auth-logo a span {
    color: var(--accent)
}

.auth-logo a:hover {
    opacity: .85
}

/* Heading */
.auth-heading {
    text-align: center;
    margin-bottom: 28px
}

.auth-heading h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 6px
}

.auth-heading p {
    font-size: 14px;
    color: var(--text-2)
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2)
}

.form-group input {
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    color: var(--text);
    background: #fafafa
}

.form-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: #fff
}

.form-group input::placeholder {
    color: var(--text-3)
}

/* Error message */
.form-error {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-weight: 500
}

.form-error.show {
    display: block
}

/* Submit button */
.auth-btn {
    width: 100%;
    padding: 13px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all .25s;
    margin-top: 4px
}

.auth-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, .3)
}

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

.auth-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 4px 0
}

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

.auth-divider span {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px
}

/* Google button (future) */
.auth-google {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text)
}

.auth-google:hover {
    border-color: var(--border-focus);
    background: var(--accent-soft)
}

/* Footer link */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-3)
}

.auth-footer a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s
}

.auth-footer a:hover {
    opacity: .75
}

/* Password visibility toggle */
.input-wrap {
    position: relative
}

.input-wrap input {
    width: 100%;
    padding-right: 40px
}

.input-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-3);
    padding: 2px;
    transition: color .2s
}

.input-toggle:hover {
    color: var(--text)
}

/* Animation */
@keyframes authIn {
    from {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* Responsive */
@media(max-width:480px) {
    .auth-card {
        padding: 32px 24px;
        border-radius: 16px;
        margin: 0
    }

    .auth-page {
        padding: 20px 16px
    }
}