/* 
   Figma Design Theme for Auth Pages
*/
:root {
    --auth-bg-main: #FFFFFF;
    --auth-bg-secondary: #F3F3F3; /* Light gray page background */
    --auth-text-main: #09090B;
    --auth-text-muted: #71717A;
    --auth-border: #E4E4E7;
    --auth-accent: #1B71D5; /* Figma Accent Blue */
    --auth-accent-hover: #155BB0;
    
    --auth-shadow-xl: 0px 8px 30px rgba(0, 0, 0, 0.04);
}

body.auth-page {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--auth-bg-secondary);
    color: var(--auth-text-main);
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Hide Spheres from old design */
.auth-sphere {
    display: none !important;
}

.auth-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px; /* Card is 500px wide */
    padding: 20px;
    box-sizing: border-box;
}

/* White Card */
.auth-card {
    background-color: var(--auth-bg-main);
    border: 1px solid var(--auth-border);
    border-radius: 16px; /* Smooth corners */
    box-shadow: var(--auth-shadow-xl);
    padding: 48px 40px; /* Left and right padding = 40px. Inputs are 500 - 40 * 2 = 420px wide */
    box-sizing: border-box;
}

/* Logo container */
.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 36px;
}

/* Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-form.hidden {
    display: none;
}

/* Form inputs & group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 0.75rem; /* ~12px */
    font-weight: 500;
    color: var(--auth-text-muted);
}

/* Underline Inputs */
.form-control {
    width: 100%;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--auth-border) !important;
    border-radius: 0 !important;
    padding: 10px 0 !important;
    font-size: 0.95rem;
    color: var(--auth-text-main);
    transition: border-bottom-color 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-control::placeholder {
    color: #A1A1AA;
}

.form-control:focus {
    outline: none;
    border-bottom-color: var(--auth-accent) !important;
}

/* Remove browser autofill blue/yellow background */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover, 
.form-control:-webkit-autofill:focus, 
.form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: var(--auth-text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Custom Select Dropdown styles */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid var(--auth-border);
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--auth-text-main);
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
}

.custom-select-trigger svg {
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select-trigger svg {
    transform: rotate(180deg);
}

.custom-select-options-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 4px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.custom-select.open .custom-select-options-list {
    display: block;
}

.custom-select-option {
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--auth-text-main);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-align: left;
}

.custom-select-option:hover {
    background-color: #F4F4F5;
}

.custom-select-option.active {
    background-color: #EBF3FF;
    color: var(--auth-accent);
    font-weight: 500;
}

/* Buttons */
.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--auth-accent);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 12px;
}

.btn-submit:hover {
    background: var(--auth-accent-hover);
}

.btn-submit:active {
    transform: scale(0.98);
}

/* Links Section */
.auth-links-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    font-size: 0.8rem;
    padding: 0 4px;
}

.auth-links-row a {
    color: var(--auth-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-links-row a:hover {
    color: var(--auth-text-main);
}

.auth-links-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    font-size: 0.8rem;
}

.auth-links-center a {
    color: var(--auth-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-links-center a:hover {
    color: var(--auth-text-main);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 4px solid var(--auth-text-main);
    box-shadow: 0px 4px 12px rgba(0,0,0,0.05);
    padding: 16px 24px;
    border-radius: 12px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 500;
    font-size: 0.9rem;
}
.toast.show {
    transform: translateX(0);
}
.toast.success { border-color: var(--auth-accent); }
.toast.error { border-color: #EF4444; }
