.auth-page-container {
    min-height: 100vh;
    background: #0f172a; /* Solid deep slate base */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: white;
    overflow-y: auto;
}

.auth-layout {
    display: flex;
    gap: 60px;
    max-width: 1100px;
    width: 100%;
    align-items: flex-start;
}

.portal-sidebar {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 36px;
    padding: 36px 28px;
}

.portal-sidebar h1 {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}

.portal-sidebar p {
    color: #94a3b8;
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 8px;
}

.engine-launchpad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.engine-portal-btn {
    background: #ffffff;
    border: 2px solid transparent;
    border-radius: 22px;
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    min-width: 0;
    min-height: 88px;
}

.engine-portal-btn:hover {
    background: #f8fafc;
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-3px);
}

.engine-portal-btn.active {
    border-color: var(--primary, #10b981);
    background: rgba(16, 185, 129, 0.18);
    box-shadow: 0 0 0 2px var(--primary, #10b981);
}

.portal-icon {
    width: 44px;
    height: 44px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.engine-portal-btn.active .portal-icon {
    background: #ffffff;
}

.portal-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.portal-name {
    font-size: 11.5px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
}

.engine-portal-btn.active .portal-name {
    color: #ffffff;
}

.auth-card {
    width: 460px;
    background: #1e293b; /* Reverted to preferred slate blue */
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 48px;
    padding: 64px;
    box-shadow: 
        0 40px 100px -20px rgba(0,0,0,0.8),
        inset 0 0 0 1px rgba(255,255,255,0.1);
    animation: authCardEntry 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    z-index: 10;
}

@keyframes authCardEntry {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

.auth-logo-main {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 20px;
    margin: 0 auto 32px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.auth-logo-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-header h2 {
    font-size: 38px !important;
    font-weight: 950 !important;
    margin-bottom: 12px !important;
    letter-spacing: -0.05em !important;
    color: #e2e8f0 !important; 
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.auth-header p {
    color: #94a3b8;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
}

.auth-form label {
    display: block;
    font-size: 12px;
    font-weight: 900;
    color: #f1f5f9 !important; /* Very light slate for labels */
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding-left: 4px;
}

.auth-form input, .auth-form select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 20px 28px;
    color: white !important;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(10px);
}

.auth-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 24px center;
    background-size: 16px;
    padding-right: 60px;
    cursor: pointer;
}

/* Dark mode options support */
.auth-form select option {
    background: #0f172a;
    color: white;
    padding: 12px;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 4px rgba(0,0,0,0.2);
}

.auth-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 100px; /* Pill button */
    font-size: 17px;
    font-weight: 950;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-top: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.auth-footer {
    margin-top: 40px;
    text-align: center;
    font-size: 14px;
    color: var(--slate-400);
    font-weight: 600;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 800;
}

.errorlist {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 24px;
    list-style: none;
    font-size: 14px;
    font-weight: 700;
}

.auth-inline-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #34d399;
    text-decoration: none;
}
.auth-inline-link:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .auth-layout {
        flex-direction: column-reverse;
        align-items: center;
        gap: 28px;
    }
    .portal-sidebar {
        text-align: center;
        width: 100%;
        max-width: 460px;
        padding: 26px 18px;
        border-radius: 28px;
    }
    .engine-launchpad { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .auth-card { width: 100%; max-width: 460px; margin: 0 auto; }
}

@media (max-width: 600px) {
    .auth-page-container { padding: 20px 14px 48px 14px; align-items: flex-start; }
    .portal-sidebar { padding: 20px 14px; border-radius: 24px; gap: 16px; }
    .portal-sidebar h1 { font-size: 24px; }
    .engine-launchpad { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .engine-portal-btn { padding: 12px 6px; border-radius: 16px; min-height: 78px; gap: 6px; }
    .portal-icon { width: 36px; height: 36px; border-radius: 11px; padding: 5px; }
    .portal-name { font-size: 10.5px; letter-spacing: 0.02em; }
    .auth-card { padding: 28px 18px; border-radius: 26px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
    .auth-header { margin-bottom: 24px; }
    .auth-header h2 { font-size: 26px !important; }
    .auth-header p { font-size: 14.5px; }
    .auth-logo, .auth-logo-main { width: 68px; height: 68px; margin-bottom: 18px; }
    .auth-form input, .auth-form select { padding: 14px 18px; border-radius: 16px; font-size: 16px; min-height: 48px; }
    .auth-btn { padding: 15px 18px; border-radius: 16px; min-height: 50px; font-size: 15.5px; }
    .auth-footer { margin-top: 24px; padding-top: 20px; }
    .auth-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
}

@media (max-width: 359px) {
    .auth-page-container { padding: 14px 10px 44px 10px; }
    .auth-card { padding: 22px 14px; border-radius: 22px; }
    .engine-launchpad { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}



/* =========================================================
   LAUNCHPAD WORKSPACE MOBILE & TABLET RESPONSIVENESS
   ========================================================= */
@media (max-width: 900px) {
    .launchpad-container,
    .launchpad-wrapper {
        padding: 20px 16px 88px 16px !important;
    }
    .launchpad-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 14px !important;
    }
    .launchpad-grid,
    .org-cards-grid {
        grid-template-columns: 1fr !important;
    }
}
