@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary:        #1a56db;
    --primary-hover:  #1544b8;
    --primary-light:  #3b82f6;
    --text-main:      #111827;
    --text-sub:       #6b7280;
    --text-muted:     #9ca3af;
    --border:         #e5e7eb;
    --input-bg:       #f9fafb;
    --danger:         #ef4444;
    --font:           'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== RESET / BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

body.auth-body {
    background: #f3f4f6;
    font-family: var(--font);
    color: var(--text-main);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ===== LAYOUT ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 960px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 440px;
    }
    .auth-sidebar {
        display: none !important;
    }
}

/* ===== SIDEBAR ===== */
.auth-sidebar {
    background: linear-gradient(160deg, #1a56db 0%, #1e40af 100%);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
}

.auth-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.auth-sidebar-logo {
    max-height: 72px;
    width: auto;
    object-fit: contain;
}

.auth-sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.auth-sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 0;
}

.auth-sidebar-headline {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #ffffff;
}

.auth-sidebar-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.93rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.auth-sidebar-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
    font-weight: 500;
}

.auth-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    flex-shrink: 0;
    color: #ffffff;
}

.auth-sidebar-footer {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* ===== BACK LINK ===== */
.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-sub);
    font-size: 0.83rem;
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: color 0.15s;
}

.auth-back-link:hover {
    color: var(--primary);
}

/* ===== FORM SECTION ===== */
.auth-form-section {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 480px) {
    .auth-form-section {
        padding: 2rem 1.5rem;
    }
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    letter-spacing: -0.4px;
}

.auth-form-subtitle {
    color: var(--text-sub);
    font-size: 0.88rem;
}

.auth-form-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.auth-form-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ===== INPUTS ===== */
.auth-input-group {
    position: relative;
    margin-bottom: 1.1rem;
}

.auth-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s;
}

.auth-label {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 2;
    background: transparent;
}

.auth-input {
    width: 100%;
    height: 46px;
    background: var(--input-bg) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 10px !important;
    padding: 0 14px 0 40px !important;
    font-size: 0.9rem !important;
    color: var(--text-main) !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    outline: none !important;
    font-family: var(--font) !important;
}

.auth-input::placeholder {
    color: transparent !important;
}

.auth-input:focus {
    border-color: var(--primary) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1) !important;
}

.auth-input:focus + .auth-label,
.auth-input:not(:placeholder-shown) + .auth-label {
    top: 4px;
    left: 40px;
    font-size: 0.72rem;
    color: var(--primary);
    transform: translateY(-100%);
    background: #ffffff;
    padding: 0 3px;
}

.auth-input:focus ~ .auth-input-icon {
    color: var(--primary);
}

/* ===== HELPERS ROW ===== */
.auth-form-helpers {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

/* Checkbox */
.auth-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.auth-checkbox-box {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.auth-checkbox:checked ~ .auth-checkbox-box {
    background: var(--primary);
    border-color: var(--primary);
}

.auth-checkbox-box::after {
    content: '';
    width: 5px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s;
    margin-bottom: 1px;
}

.auth-checkbox:checked ~ .auth-checkbox-box::after {
    transform: rotate(45deg) scale(1);
}

.auth-checkbox-label {
    color: var(--text-sub);
    font-size: 0.85rem;
}

.auth-forgot-link {
    color: var(--text-sub);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.auth-forgot-link:hover {
    color: var(--primary);
}

/* ===== SUBMIT BUTTON ===== */
.auth-btn-primary {
    width: 100%;
    height: 46px;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.2);
    font-family: var(--font);
}

.auth-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26, 86, 219, 0.3);
}

.auth-btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ===== DIVIDER ===== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ===== SOCIAL BUTTONS ===== */
.auth-social-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.auth-social-btn {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.auth-social-btn:hover { border-color: var(--primary-light); box-shadow: 0 2px 8px rgba(59,130,246,0.12); transform: translateY(-1px); }

.auth-social-btn-google {
    color: #ea4335;
    border-color: rgba(234, 67, 53, 0.4);
}
.auth-social-btn-google svg {
    fill: #ea4335;
    color: #ea4335;
}
.auth-social-btn-google:hover {
    color: #dc2626;
    border-color: #ea4335;
    background: #fff5f5;
    box-shadow: 0 2px 8px rgba(234, 67, 53, 0.18);
}

.auth-social-btn-facebook {
    color: #1877f2;
    border-color: rgba(24, 119, 242, 0.4);
}
.auth-social-btn-facebook svg {
    fill: #1877f2;
    color: #1877f2;
}
.auth-social-btn-facebook:hover {
    color: #166fe5;
    border-color: #1877f2;
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.18);
}

.auth-social-btn-twitter {
    color: #1da1f2;
    border-color: rgba(29, 161, 242, 0.4);
}
.auth-social-btn-twitter svg {
    fill: #1da1f2;
    color: #1da1f2;
}
.auth-social-btn-twitter:hover {
    color: #0c85d0;
    border-color: #1da1f2;
    background: #f0f9ff;
    box-shadow: 0 2px 8px rgba(29, 161, 242, 0.18);
}

/* ===== VALIDATION ===== */
.auth-validation-summary {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.auth-validation-summary ul { margin: 0; padding-left: 1.1rem; }

.text-danger { color: var(--danger) !important; }

span.text-danger {
    font-size: 0.78rem;
    margin-top: 4px;
    display: block;
}

/* ===== REMOVE old blob/glow (not needed) ===== */
.auth-glow-container { display: none !important; }
