/* ============================================================
   WayQuest — Unified Auth & Portal UI/UX Stylesheet (auth.css)
   Matches landing.css palette, typography, and glassmorphism
   ============================================================ */

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

:root {
    --wq-bg: #070919;
    --wq-bg-2: #0c1029;
    --wq-card: rgba(15, 23, 42, 0.85);
    --wq-card-border: rgba(99, 102, 241, 0.24);
    --wq-primary: #3b6ef8;
    --wq-accent: #7c3cf8;
    --wq-cyan: #06b6d4;
    --wq-grad: linear-gradient(135deg, #3b6ef8 0%, #7c3cf8 100%);
    --wq-text: #f8fafc;
    --wq-muted: #94a3b8;
    --wq-input-bg: rgba(15, 23, 42, 0.9);
    --wq-input-border: rgba(99, 102, 241, 0.3);
}

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

html {
    overflow-x: clip;
}

img {
    max-width: 100%;
    height: auto;
}

body.wq-auth-body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--wq-bg);
    background-image:
        radial-gradient(ellipse 65% 55% at 15% 15%, rgba(59, 110, 248, 0.16) 0%, transparent 70%),
        radial-gradient(ellipse 55% 50% at 85% 85%, rgba(124, 60, 248, 0.14) 0%, transparent 70%);
    color: var(--wq-text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.wq-auth-card,
.wq-split-shell {
    margin: auto;
}

.wq-auth-card {
    background: var(--wq-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--wq-card-border);
    border-radius: 22px;
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(59, 110, 248, 0.08);
    position: relative;
}

.wq-auth-card.wq-auth-card-lg {
    max-width: 540px;
}

.wq-brand-header {
    text-align: center;
    margin-bottom: 1.6rem;
}

.wq-brand-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 14px rgba(59, 110, 248, 0.35));
}

.wq-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(59, 110, 248, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #93c5fd;
    padding: 0.32rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.65rem;
}

.wq-auth-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.wq-auth-subtitle {
    color: var(--wq-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ── Form Labels & Inputs ── */
.wq-auth-body .form-label {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.wq-auth-body .form-control,
.wq-auth-body .form-select {
    background-color: var(--wq-input-bg);
    border: 1px solid var(--wq-input-border);
    color: var(--wq-text);
    border-radius: 11px;
    padding: 0.68rem 1rem;
    font-size: 0.95rem;
    min-height: 46px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.wq-auth-body .form-control::placeholder {
    color: #64748b;
}

.wq-auth-body .form-control:focus,
.wq-auth-body .form-select:focus {
    background-color: #0f172a;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
    color: #ffffff;
    outline: none;
}

/* Custom high-contrast light chevron for dark select dropdowns */
.wq-auth-body .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 14px 10px;
    padding-right: 2.5rem;
}

.wq-auth-body .form-select option {
    background-color: #0f172a;
    color: #f8fafc;
}

/* Fix Chrome/Edge white autofill background on dark cards */
.wq-auth-body input:-webkit-autofill,
.wq-auth-body input:-webkit-autofill:hover,
.wq-auth-body input:-webkit-autofill:focus,
.wq-auth-body textarea:-webkit-autofill,
.wq-auth-body select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #f8fafc !important;
    border-color: rgba(99, 102, 241, 0.45) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Input group with eye toggle */
.wq-auth-body .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.wq-eye-btn {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid var(--wq-input-border);
    border-left: none;
    color: #94a3b8;
    border-radius: 0 11px 11px 0;
    padding: 0 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.wq-eye-btn:hover,
.wq-eye-btn:focus {
    background: rgba(51, 65, 85, 0.9);
    color: #f8fafc;
}

/* ── Unified Buttons ── */
.wq-btn-primary {
    background: var(--wq-grad);
    border: none;
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.78rem 1.4rem;
    border-radius: 11px;
    font-size: 0.96rem;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(59, 110, 248, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.wq-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(59, 110, 248, 0.5);
    color: #ffffff !important;
}

.wq-btn-outline {
    background: rgba(59, 110, 248, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.38);
    color: #cbd5e1 !important;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: 11px;
    font-size: 0.9rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wq-btn-outline:hover {
    background: rgba(59, 110, 248, 0.2);
    border-color: #6366f1;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* ── Divider ── */
.wq-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1.35rem 0;
}

.wq-divider::before,
.wq-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.wq-divider:not(:empty)::before { margin-right: 0.85em; }
.wq-divider:not(:empty)::after { margin-left: 0.85em; }

/* ── Google Sign-In Wrapper ── */
.wq-google-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 44px;
}

/* ── Alerts ── */
.wq-alert {
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.wq-alert-danger {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.wq-alert-success {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.wq-alert-info {
    background: rgba(59, 110, 248, 0.14);
    border-color: rgba(99, 102, 241, 0.38);
    color: #bfdbfe;
}

/* ── Links ── */
.wq-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.18s ease;
}

.wq-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.wq-back-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
}

.wq-back-link:hover {
    color: #f8fafc;
}

@media (max-width: 576px) {
    body.wq-auth-body {
        padding: 1rem 0.75rem;
    }
    .wq-auth-card {
        padding: 1.75rem 1.35rem;
        border-radius: 18px;
    }
    .wq-auth-title {
        font-size: 1.35rem;
    }
}

/* ── Split Login Layout (Showcase Left, Login Form Right) ── */
.wq-split-shell {
    width: 100%;
    max-width: 1020px;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(99, 102, 241, 0.24);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.62), 0 0 60px rgba(59, 110, 248, 0.08);
}

.wq-split-showcase {
    position: relative;
    min-width: 0;
    padding: 3rem 2.6rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(circle at 20% 20%, rgba(59, 110, 248, 0.28) 0%, transparent 55%),
        radial-gradient(circle at 85% 85%, rgba(124, 60, 248, 0.25) 0%, transparent 55%),
        linear-gradient(160deg, rgba(15, 23, 42, 0.96) 0%, rgba(11, 16, 40, 0.98) 100%);
    border-right: 1px solid rgba(99, 102, 241, 0.18);
}

.wq-split-showcase--admin {
    background:
        radial-gradient(circle at 20% 20%, rgba(244, 63, 94, 0.24) 0%, transparent 55%),
        radial-gradient(circle at 85% 85%, rgba(124, 60, 248, 0.22) 0%, transparent 55%),
        linear-gradient(160deg, rgba(20, 14, 34, 0.96) 0%, rgba(10, 12, 28, 0.98) 100%);
}

.wq-showcase-logo {
    height: 54px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(59, 110, 248, 0.35));
}

.wq-showcase-heading {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.22;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 1.25rem 0 0.75rem;
}

.wq-showcase-desc {
    color: #94a3b8;
    font-size: 0.94rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.wq-feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.wq-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.wq-feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 110, 248, 0.16);
    color: #60a5fa;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.wq-feature-icon--rose {
    background: rgba(244, 63, 94, 0.16);
    color: #fda4af;
}

.wq-split-form {
    min-width: 0;
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
}

@media (max-width: 991.98px), (max-height: 760px) {
    body.wq-auth-body {
        align-items: flex-start;
    }
}

@media (max-width: 991.98px) {
    .wq-split-shell {
        grid-template-columns: minmax(0, 1fr);
        max-width: 480px;
        width: 100%;
    }
    .wq-split-form {
        order: -1;
        padding: 1.85rem 1.4rem;
    }
    .wq-split-showcase {
        border-right: none;
        border-top: 1px solid rgba(99, 102, 241, 0.18);
        padding: 1.5rem 1.4rem;
    }
    .wq-showcase-heading {
        font-size: 1.35rem;
    }
}

@media (max-width: 768px) {
    body.wq-auth-body .form-control,
    body.wq-auth-body .form-select {
        font-size: 1rem;
        min-height: 44px;
    }
    .wq-btn-primary,
    .wq-btn-outline,
    .wq-eye-btn {
        min-height: 44px;
    }
}

@media (max-width: 420px) {
    body.wq-auth-body {
        padding: 0.75rem 0.6rem;
    }
    .wq-split-shell,
    .wq-auth-card {
        border-radius: 18px;
    }
    .wq-auth-card {
        padding: 1.5rem 1.1rem;
    }
    .wq-split-form {
        padding: 1.4rem 1.05rem;
    }
    .wq-split-showcase {
        padding: 1.25rem 1.05rem;
    }
}

.wq-google-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 359.98px) {
    .wq-google-wrap > div {
        transform: scale(0.9);
        transform-origin: center;
    }
}
