:root {
    --color-crm-bg: #0f172a;
    --color-crm-surface: #1e293b;
    --color-crm-primary: #0ea5e9;
    --color-crm-secondary: #22c55e;
    --color-crm-text: #ffffff;
    --color-crm-text-muted: #cbd5e1;
    --color-crm-border: #475569;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--color-crm-bg);
    /* Lighter gradient for better visibility of the "depth" */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(14, 165, 233, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(34, 197, 94, 0.15), transparent 25%);
    color: var(--color-crm-text);
    font-family: 'Exo 2', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
}

/* Background Animation Layer - Pushed back */
.auth-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Lighter overlay so it's not pitch black */
    background:
        linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)),
        url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAgNDBMMDQwIDBMIHkwIiBzdHJva2U9InJnYmEoMjU1LDI1NSwyNTUsMC4xKSIgZmlsbD0ibm9uZSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmlkKSIvPjwvc3ZnPg==');
    z-index: 1;
    /* Lowest */
    pointer-events: none;
    /* Ensure clicks pass through */
}

/* Container */
.auth-container {
    position: relative;
    z-index: 10;
    /* Higher than BG */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Glass Card - High Visibility */
.glass-panel {
    background: rgba(30, 41, 59, 0.85);
    /* More opaque for contrast */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Brighter border */
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.5),
        0 8px 10px -6px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(14, 165, 233, 0.2);
    border-radius: 1rem;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
    position: relative;
    z-index: 20;
    /* Very high to ensure inputs interact */
}

.auth-header {
    margin-bottom: 2.5rem;
}

.auth-logo {
    height: 3.5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.6));
}

.auth-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #ffffff;
    /* FORCE WHITE */
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
    letter-spacing: 1px;
}

.auth-header p {
    color: var(--color-crm-text-muted);
    font-size: 1rem;
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #e2e8f0;
    /* Brighter label */
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    /* Lighter background for inputs */
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: #ffffff;
    /* Force white text input */
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-crm-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.form-actions {
    margin-top: 2.5rem;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 0.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 30;
    /* Ensure button is top */
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-crm-primary), #0284c7);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.3), 0 0 15px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.5), 0 0 25px rgba(14, 165, 233, 0.6);
    filter: brightness(1.1);
}

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

.auth-footer {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--color-crm-text-muted);
}

.link-secondary {
    color: var(--color-crm-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.link-secondary:hover {
    color: #38bdf8;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.auth-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-align: center;
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spinner */
.btn-loader {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}