/* --- Global Theme Variables Definitions --- */
:root {
    --bg-dark: #0a0a0c;
    --card-glass: rgba(255, 255, 255, 0.04);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    --transition-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- System Framework Resets --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* --- Ambient Kinetic Background Gradients Layer --- */
.bg-ambient-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 85% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 40%);
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    filter: blur(1px);
    pointer-events: none;
}
.p-1 { top: 25%; left: 15%; width: 6px; height: 6px; opacity: 0.3; }
.p-2 { top: 70%; left: 25%; width: 4px; height: 4px; opacity: 0.2; }
.p-3 { top: 40%; left: 80%; width: 8px; height: 8px; opacity: 0.15; }
.p-4 { top: 85%; left: 75%; width: 5px; height: 5px; opacity: 0.25; }

/* --- Main Portal Modal Viewport Wrapper --- */
.login-overlay {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Reveal configuration hooks for script-triggered dismissal operations */
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.5s var(--transition-premium), transform 0.5s var(--transition-premium);
}

/* Target dismissal active hook state */
.login-overlay.portal-dismissed {
    opacity: 0;
    transform: scale(0.94) translateY(15px);
    pointer-events: none;
}

/* --- Premium Frosted Glass Layout Container Box --- */
.login-card {
    position: relative;
    width: 100%;
    background: rgba(18, 18, 22, 0.45);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* --- Absolute Dismissional Trigger Component --- */
.portal-close-btn {
    position: absolute;
    top: 20px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.portal-close-btn:hover {
    color: #ef4444;
    transform: scale(1.1);
}

/* --- Header & Branding Sections --- */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-logo-glow {
    display: inline-flex;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.brand-icon {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.login-header h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Modern Interactive Material Input Groups --- */
.input-group {
    position: relative;
    margin-bottom: 1.75rem;
}

.input-group input {
    width: 100%;
    padding: 14px 0 10px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(156, 163, 175, 0.3);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

/* Float Label Engine */
.input-group label {
    position: absolute;
    top: 14px;
    left: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
    transition: transform 0.3s var(--transition-premium), color 0.3s ease, font-size 0.3s ease;
    transform-origin: left top;
}

/* Triggers when field is actively selected or contains content text */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    transform: translateY(-20px) scale(0.82);
    color: var(--accent-indigo);
}

/* Expanding accent color bottom line bar animation track */
.input-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-indigo), var(--accent-purple));
    transform: scaleX(0);
    transition: transform 0.3s var(--transition-premium);
}

.input-group input:focus ~ .input-bar {
    transform: scaleX(1);
}

/* Visibility Password Toggle Hook Button */
.eye-toggle-icon {
    position: absolute;
    right: 5px;
    top: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}
.eye-toggle-icon:hover { color: var(--text-primary); }

/* --- Form Utilities Utilities Row --- */
.form-utilities {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.25rem;
    font-size: 0.88rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
}

.checkbox-container input { display: none; }

.checkmark {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(156, 163, 175, 0.4);
    border-radius: 4px;
    margin-right: 8px;
    display: inline-block;
    position: relative;
    background: transparent;
    transition: all 0.2s ease;
}

.checkbox-container input:checked ~ .checkmark {
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
}

.checkbox-container input:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-link {
    color: var(--accent-indigo);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}
.forgot-link:hover { color: var(--accent-purple); text-decoration: underline; }

/* --- Premium Glowing Submit Authentication Action Control Button --- */
.btn-auth-submit {
    position: relative;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn-auth-submit:active { transform: translateY(0); }

/* Submit Button Pending Spinner Animation Configurations */
.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s ease;
}

@keyframes spinLoop {
    to { transform: rotate(360deg); }
}

/* Authentication Loading Active Class Hooks handled via Javascript submit execution */
.btn-auth-submit.auth-loading .btn-text { opacity: 0; }
.btn-auth-submit.auth-loading .btn-spinner {
    opacity: 1;
    animation: spinLoop 0.6s linear infinite;
}

/* --- Panel Legal Footer Segment --- */
.login-footer {
    margin-top: 2.25rem;
    text-align: center;
}

.login-footer p {
    font-size: 0.72rem;
    color: rgba(156, 163, 175, 0.4);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --- Registration Alternative Action UI Additions --- */
.auth-alternative-box {
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.alt-text {
    font-size: 0.85rem;
    color: #6b7280; /* Gray muted text color */
    font-weight: 500;
}

.btn-auth-secondary {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.02);
    color: #f3f4f6;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-auth-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.4); /* Subtly lights up with Loraxs signature indigo border hover */
    color: #ffffff;
}



/* Create an Account Section/*

/* --- Register Specific UI Extensions --- */

.password-strength-wrapper {
    margin: -10px 0 20px 0;
    width: 100%;
}

.strength-meter-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-progress-fill {
    width: 0%;
    height: 100%;
    background: #ef4444; /* Baseline red marker */
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-meta-text {
    font-size: 0.72rem;
    font-weight: 600;
    font-family: monospace;
    color: #6b7280;
    letter-spacing: 0.3px;
}

/* Authentication Routing Links Box Base Alignment overrides */
.auth-alternative-box {
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.alt-text {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.btn-auth-secondary {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.02);
    color: #f3f4f6;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-auth-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.4);
    color: #ffffff;
}



