/* ══════════════════════════════════════
   auth_styles.css — Lumina Auth System
   Premium, Clean White Authentication
   ══════════════════════════════════════ */

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

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --primary-glow: rgba(99,102,241,.18);
    --accent-violet: #8b5cf6;
    --accent-cyan: #06b6d4;
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --border-default: #e2e8f0;
    --border-strong: #cbd5e1;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-card: 0 20px 60px -15px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.03);
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    background: var(--bg-body);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Decorative background elements */
body::before {
    content: '';
    position: fixed;
    top: -30%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
body::after {
    content: '';
    position: fixed;
    bottom: -30%; left: -15%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(6,182,212,.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-card);
    animation: cardEntry .6s cubic-bezier(.34,1.56,.64,1) both;
    position: relative;
    z-index: 1;
}

@keyframes cardEntry {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-header { text-align: center; margin-bottom: 36px; }

.auth-logo {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--accent-violet));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(99,102,241,.25);
    transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.auth-logo:hover { transform: scale(1.08) rotate(-3deg); }

.auth-header h2 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.75rem;
    margin-bottom: 8px;
    letter-spacing: -.5px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: .9375rem;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    color: var(--text-primary);
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-wrapper { position: relative; }

.input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: .95rem;
    transition: color .25s;
    pointer-events: none;
}

.form-control {
    width: 100%;
    background: white;
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 12px 14px 12px 42px;
    color: var(--text-primary);
    font-size: .9375rem;
    font-family: 'Inter', sans-serif;
    transition: all .25s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-control:focus ~ i,
.input-wrapper:focus-within i {
    color: var(--primary);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-auth {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent-violet));
    border: none;
    border-radius: var(--radius-md);
    padding: 13px;
    color: white;
    font-weight: 700;
    font-size: .9375rem;
    cursor: pointer;
    transition: all .3s;
    margin-top: 12px;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,.3);
}

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

.message {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: .875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown .35s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.message.error   { background: #fef2f2; color: #ef4444; border: 1px solid #fee2e2; }
.message.success { background: #ecfdf5; color: #10b981; border: 1px solid #d1fae5; }

.auth-footer {
    text-align: center;
    margin-top: 28px;
    color: var(--text-secondary);
    font-size: .875rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: color .2s;
}
.auth-footer a:hover { color: var(--primary-hover); text-decoration: underline; }

/* Role Tabs */
.role-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 28px;
    gap: 4px;
}

.role-tab {
    flex: 1;
    text-align: center;
    padding: 9px 8px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: .8125rem;
    cursor: pointer;
    border-radius: 9px;
    transition: all .25s;
}
.role-tab:hover { color: var(--primary); }

.role-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    font-weight: 700;
}

@media (max-width: 520px) {
    .auth-card { padding: 32px 22px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .auth-header h2 { font-size: 1.5rem; }
}
