@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

.auth-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #070b14;
    background-image:
        radial-gradient(ellipse 70% 45% at 50% -10%, rgba(14, 165, 233, 0.18), transparent),
        radial-gradient(ellipse 50% 35% at 100% 100%, rgba(99, 102, 241, 0.12), transparent),
        linear-gradient(rgba(14, 165, 233, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.04) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(56, 189, 248, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.auth-card {
    position: relative;
    background: rgba(12, 18, 32, 0.72);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 20px;
    padding: 2rem 2rem 1.75rem;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 32px 64px -16px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(14, 165, 233, 0.06);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
    border-radius: 1px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
    letter-spacing: -0.02em;
}

.auth-brand h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}

.auth-brand h1 .accent {
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-badge {
    display: inline-block;
    margin-top: 0.6rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.auth-badge.user {
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(14, 165, 233, 0.1);
    color: #7dd3fc;
}

.auth-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
    margin: 0 0 1.5rem;
    font-weight: 400;
}

.auth-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.15), transparent);
    margin-bottom: 1.5rem;
}

.auth-field {
    margin-bottom: 1rem;
}

.auth-field label {
    display: block;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 0.45rem;
    letter-spacing: 0.02em;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    font-size: 0.85rem;
    pointer-events: none;
    transition: color 0.2s;
}

.auth-input-wrap input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.65rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-input-wrap input::placeholder {
    color: #475569;
}

.auth-input-wrap input:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.auth-input-wrap input:focus + .icon,
.auth-input-wrap:focus-within .icon {
    color: #38bdf8;
}

.auth-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    color: #fff;
    font-size: 0.925rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    position: relative;
    overflow: hidden;
}

.auth-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.35);
}

.auth-btn:hover::after {
    opacity: 1;
}

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

.auth-footer {
    text-align: center;
    margin-top: 1.35rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.auth-footer a {
    color: #38bdf8;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #7dd3fc;
}

.auth-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    color: #fca5a5;
    font-size: 0.85rem;
    line-height: 1.5;
}

.auth-error div + div {
    margin-top: 0.25rem;
}

.auth-meta {
    text-align: center;
    margin-top: 1.5rem;
    color: #334155;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1.25rem 1.25rem;
        border-radius: 16px;
    }

    .auth-brand h1 {
        font-size: 1.2rem;
    }
}
