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

:root {
    --bg-primary: #090d16;
    --bg-secondary: #0f172a;
    --primary-glow: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --primary-color: #6366f1;
    --secondary-glow: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(2, 6, 23, 0.5);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: rgba(99, 102, 241, 0.5);
    --error-color: #ef4444;
    --success-color: #10b981;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background glowing orbs for aesthetics */
body::before, body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

body::before {
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

body::after {
    background: radial-gradient(circle, #d946ef 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(100px, 50px) scale(1.2);
    }
}

/* Auth Container styling */
.auth-container {
    width: 100%;
    max-width: 460px;
    padding: 20px;
    perspective: 1000px;
}

.auth-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--primary-glow);
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.auth-logo svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

.auth-title {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon svg {
    width: 20px;
    height: 20px;
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--input-focus);
    background-color: rgba(15, 23, 42, 0.8);
}

.form-control.is-invalid {
    border-color: var(--error-color);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25);
}

/* Feedback messages */
.error-feedback {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Checkbox & Remember Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    appearance: none;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    width: 18px;
    height: 18px;
    border-radius: 6px;
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: var(--transition);
}

.checkbox-input:checked {
    background: var(--primary-glow);
    border-color: transparent;
}

.checkbox-input::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em #fff;
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.checkbox-input:checked::before {
    transform: scale(1);
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    color: #a855f7;
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--primary-glow);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
    transition: var(--transition);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
    filter: brightness(1.1);
}

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

/* Footer links */
.auth-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: var(--transition);
}

.auth-footer-link:hover {
    color: #a855f7;
    text-decoration: underline;
}

/* Dashboard Styling (Minimalist premium dashboard for redirect target) */
.dashboard-container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

.dashboard-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dashboard-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-glow);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.dashboard-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.dashboard-welcome {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(to right, #ffffff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-desc {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 35px;
    line-height: 1.6;
}

.dashboard-userinfo {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.dashboard-userinfo strong {
    color: #a855f7;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    color: #ef4444;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}
