/* static/auth.css */

/* 
   Force the auth page to take over the entire screen, 
   hiding the application sidebar and top-bar if they exist in base.html 
*/
body:has(.auth-page-container) {
    overflow-y: auto !important;
    height: auto !important;
    background: #0f172a; /* Deep slate background for auth flow */
}

body:has(.auth-page-container) .global-sidebar,
body:has(.auth-page-container) .top-bar,
body:has(.auth-page-container) .fixed-help-trigger {
    display: none !important;
}

body:has(.auth-page-container) .app-container,
body:has(.auth-page-container) .main-viewport,
body:has(.auth-page-container) .content-area {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    display: block !important;
    overflow: visible !important;
    background: transparent !important;
}

.auth-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 60px 20px;
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.1), transparent 40%),
                radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.05), transparent 40%);
    position: relative;
}

.auth-card {
    background: #1e293b; /* Reverted to preferred slate blue */
    width: 100%;
    max-width: 480px;
    padding: 64px;
    border-radius: 80px; /* Hyper-organic squircle */
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: auth-card-appear 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes auth-card-appear {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.auth-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px auto;
    box-shadow: 0 12px 32px rgba(0,0,0,0.1), 0 0 0 4px rgba(16, 185, 129, 0.1);
    padding: 12px;
}

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

.auth-header h2 {
    font-size: 36px;
    font-weight: 950;
    color: #ffffff;
    margin: 0 0 16px 0;
    letter-spacing: -0.05em;
}

.auth-header p {
    color: #64748b;
    font-size: 17px;
    margin: 0;
    font-weight: 600;
    line-height: 1.5;
}

.auth-form .form-group {
    margin-bottom: 28px;
}

.auth-form label {
    display: block;
    font-size: 11px;
    font-weight: 900;
    color: #94a3b8;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-left: 20px;
}

.auth-form input, .auth-form select {
    width: 100%;
    padding: 18px 28px;
    border-radius: 100px; /* Pill-shaped inputs */
    border: 2px solid #e4e4e7;
    font-size: 16px;
    font-weight: 700;
    color: #18181b;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    outline: none;
    background: #f8fafc;
}

.auth-form input:focus, .auth-form select:focus {
    border-color: var(--primary, #10b981);
    background: white;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1);
    transform: scale(1.02);
}

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

.auth-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(16, 185, 129, 0.5);
    filter: brightness(1.1);
}

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

.errorlist {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.errorlist li {
    padding: 16px 24px;
    background: #fff1f2;
    border-radius: 100px;
    color: #e11d48;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 12px;
    border: 2px solid #fecdd3;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.auth-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1.5px solid #e4e4e7;
    text-align: center;
    font-size: 15px;
    color: #64748b;
    font-weight: 700;
}

.auth-footer a {
    color: var(--primary, #10b981);
    font-weight: 900;
    text-decoration: none;
    transition: all 0.2s;
}

.auth-footer a:hover {
    text-decoration: underline;
    filter: brightness(0.8);
}

.social-auth-container {
    margin-top: 32px;
}

.social-separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

.social-separator::before, .social-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1.5px solid #f1f5f9;
}

.social-separator:not(:empty)::before { margin-right: 16px; }
.social-separator:not(:empty)::after { margin-left: 16px; }

.social-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    border-radius: 100px;
    border: 2px solid #e4e4e7;
    background: white;
    color: #18181b;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.social-btn:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateY(-2px);
}

.social-icon {
    width: 24px;
    height: 24px;
}

.form-group-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
}

.form-group-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #10b981;
}

.form-group-checkbox label {
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: 0;
    font-size: 15px;
    font-weight: 700;
    color: #cbd5e1;
    cursor: pointer;
    line-height: 1.5;
}

.form-group-checkbox label a {
    color: #ffffff !important;
    text-decoration: underline;
    font-weight: 800;
    transition: color 0.2s;
}

.form-group-checkbox label a:hover {
    color: #10b981 !important;
}
