:root {
    --auth-primary: #4361ee;
    --auth-primary-soft: rgba(67, 97, 238, 0.1);
    --auth-secondary: #7c3aed;
    --auth-bg: #f8faff;
    --auth-card-bg: rgba(255, 255, 255, 0.95);
    --auth-text: #1e293b;
    --auth-text-muted: #64748b;
    --auth-border: #e2e8f0;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--auth-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    overflow-x: hidden;
}

.auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: 
        radial-gradient(at 0% 0%, rgba(67, 97, 238, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(124, 58, 237, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(67, 97, 238, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(124, 58, 237, 0.05) 0px, transparent 50%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--auth-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 20px 25px -5px rgba(0, 0, 0, 0.05);
    animation: auth-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes auth-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 24px;
    box-shadow: 0 8px 16px rgba(67, 97, 238, 0.25);
}

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

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: var(--auth-text-muted);
    font-size: 15px;
    margin: 0;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 8px;
}

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

.input-container i {
    position: absolute;
    left: 16px;
    color: var(--auth-text-muted);
    font-size: 18px;
    transition: all 0.2s ease;
}

.auth-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background: #f8faff;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--auth-text);
    transition: all 0.2s ease;
}

.auth-input:focus {
    outline: none;
    background: white;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.auth-input:focus + i {
    color: var(--auth-primary);
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
    filter: brightness(1.05);
}

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

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--auth-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-link:hover {
    color: var(--auth-secondary);
    text-decoration: underline;
}

/* Alert Styling */
.auth-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Demo Credentials Button */
.demo-btn-trigger {
    background: transparent;
    border: 1px dashed var(--auth-border);
    color: var(--auth-text-muted);
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.demo-btn-trigger:hover {
    background: var(--auth-primary-soft);
    border-color: var(--auth-primary);
    color: var(--auth-primary);
}

/* ===== Responsive Design ===== */
@media (max-width: 575.98px) {
    .auth-card {
        padding: 32px 24px;
        border-radius: 20px;
    }
    .auth-header h1 {
        font-size: 24px;
    }
    .auth-header p {
        font-size: 14px;
    }
    .auth-logo {
        width: 48px;
        height: 48px;
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* Modal Styling */
.auth-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal.show {
    display: flex;
    animation: modal-fade-in 0.3s ease;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-modal-content {
    background: white;
    width: 100%;
    max-width: 360px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modal-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-slide-up {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal-header {
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    padding: 16px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-modal-header h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.auth-modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
}

.auth-modal-body {
    padding: 12px;
}

.demo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.demo-item:hover {
    background: var(--auth-primary-soft);
}

.demo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.demo-info h7 {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text);
}

.demo-info span {
    font-size: 12px;
    color: var(--auth-text-muted);
}
