/* ================================================
   Auth Page — Minimal, Centered, White Aesthetic
   ================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-page: #fafafa;
    --bg-card: #ffffff;
    --text-primary: #09090b;
    --text-secondary: #71717a;
    --border-color: #e4e4e7;
    --input-bg: #ffffff;
    --input-focus-border: #09090b;
    --btn-primary-bg: #09090b;
    --btn-primary-text: #ffffff;
    --btn-primary-hover: #27272a;
    --color-error: #ef4444;
    --color-success: #10b981;
}

#auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: var(--bg-page);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', sans-serif;
    overflow-y: auto;
    padding: 20px;
    transition: opacity 0.5s, visibility 0.5s;
}

#auth-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Ambient Background Blobs */
.auth-bg-fx {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.fx-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s infinite alternate ease-in-out;
}

.fx-1 {
    width: 600px; height: 600px;
    background: #4f46e5;
    top: -200px; left: -200px;
}
.fx-2 {
    width: 500px; height: 500px;
    background: #ec4899;
    bottom: -150px; right: -100px;
    animation-delay: -10s;
}
.fx-3 {
    width: 400px; height: 400px;
    background: #06b6d4;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Auth Card */
.auth-box {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 20px 40px -10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.04);
    padding: 40px;
    margin: auto;
    display: flex;
    flex-direction: column;
}

/* Header */
.auth-box-header {
    text-align: center;
    margin-bottom: 32px;
}
.auth-logo {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.auth-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}
.auth-logo span {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}
    border: 1px solid #e4e4e7;
}
.auth-box-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.auth-box-header p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: #f4f4f5;
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 32px;
    position: relative;
}
.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}
.auth-tab.active {
    color: var(--text-primary);
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Form Area */
.auth-form-area {
    position: relative;
    min-height: 250px;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: fadeScale 0.3s ease-out forwards;
}
.auth-form.active {
    display: flex;
}

@keyframes fadeScale {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Inputs */
.auth-input-row {
    display: flex;
    gap: 16px;
}
.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.auth-input-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.forgot-link {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.forgot-link:hover {
    color: var(--text-primary);
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}
.auth-input-group input::placeholder {
    color: #a1a1aa;
}
.auth-input-group input:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.05);
}

.eye-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #a1a1aa;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.eye-btn:hover {
    color: var(--text-primary);
}

/* Button */
.auth-btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 8px;
}
.auth-btn-primary:hover {
    background: var(--btn-primary-hover);
}
.auth-btn-primary:active {
    transform: scale(0.98);
}

.auth-btn-primary.loading span {
    opacity: 0;
}
.spinner {
    position: absolute;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
}
.auth-btn-primary.loading .spinner {
    opacity: 1;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-msg {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    min-height: 18px;
}

/* Password Strength */
.pwd-strength {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: -4px;
}
.pwd-bars {
    display: flex;
    gap: 4px;
}
.p-bar {
    flex: 1;
    height: 3px;
    background: #f4f4f5;
    border-radius: 2px;
    transition: background 0.3s;
}
.p-bar.active.weak { background: var(--color-error); }
.p-bar.active.fair { background: #f59e0b; }
.p-bar.active.good { background: #3b82f6; }
.p-bar.active.strong { background: var(--color-success); }
.pwd-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Footer */
.auth-box-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-secondary);
}
.auth-box-footer a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.auth-box-footer a:hover {
    color: var(--btn-primary-bg);
}

.powered-by-vorniity {
    margin-top: 24px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
}
.powered-by-logo {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}
.powered-by-vorniity span {
    font-weight: 700;
    color: var(--text-primary);
}
.powered-by-vorniity:hover {
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .auth-box {
        padding: 30px 20px;
        border-radius: 16px;
        border: none;
    }
    .auth-input-row {
        flex-direction: column;
        gap: 16px;
    }
}
