/* ==========================================================================
   Wells Data Explorer - Premium Glassmorphic Auth System Styles
   ========================================================================== */

/* Auth Screen Overlay Container */
.auth-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #89CFF0 0%, #0f172a 80%);
    z-index: 9641;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* White auth box */
.auth-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
    animation: authFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Auth logo and title */
.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    background: linear-gradient(90deg, #0284c7, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* Forms */
.auth-form {
    animation: authSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-form h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
    text-align: center;
    letter-spacing: -0.01em;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.25s ease;
    box-sizing: border-box;
    font-family: var(--font-family);
}

.auth-form input:hover {
    border-color: #38bdf8;
}

.auth-form input:focus {
    outline: none;
    border-color: #0ea5e9;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.auth-form input::placeholder {
    color: #94a3b8;
}

/* Submit Action Button */
.auth-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #0ea5e9, #6366f1);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.975rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 6px;
    font-family: var(--font-family);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    background: linear-gradient(90deg, #38bdf8, #818cf8);
}

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

/* Navigation Links */
.auth-links {
    margin-top: 24px;
    text-align: center;
}

.auth-links p {
    margin: 6px 0;
    font-size: 0.875rem;
    color: #64748b;
}

.auth-links a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Notification Message Area */
#auth-message {
    margin-top: 18px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
    display: none;
    font-weight: 500;
}

.sidebar-user-block {
    display: flex;
    flex-direction: column;
    align-items: center;
     min-width: 0; /* important */
    gap: 1px; /* reduced gap */
    /* remove extra bottom padding/margin */
    padding-bottom: 8px;
    margin-bottom: 8px;
    /* keep border for visual separation if desired */
    border-bottom: 1px solid var(--border-color);
    
    
}


/* Updated selector to match HTML class */
.user-welcome-name {
    font-size: 1.0rem;
    color: var(--text-muted);
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 280px;
    padding-top: 8px;   /* 8px top padding */
    text-align: left;  /* center horizontally */
}

.logout-btn-full {
    background: #e53935;   /* vibrant red */
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
    display: block;
    margin: 0 auto;   /* center horizontally */
}

.logout-btn-full:hover {
    background: #c62828;   /* darker on hover */
    color: #fff;
}

.sidebar-sep {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 8px 0;
    width: 80%;
}

#auth-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

#auth-message.success {
    display: block;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Logout Button */
.logout-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
    display: block;               /* center below welcome */
    margin: 8px auto 0;           /* horizontally center */
}

.logout-btn:hover {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
}

/* User Welcome Display */
.user-welcome {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 140px;
    padding-top: 8px;   /* 8px top padding */
}

/* Custom layout helper to hide tree explorer panels before login */
#app-container {
    height: 100vh;
    width: 100vw;
    display: flex;
}
