/* Authentication Pages Styles - Fresh Modern Design */

body {
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff);
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    animation: slideUp 0.6s ease-out;
    position: relative;
    z-index: 1;
}

/* Layout: full-bleed hero on the left, centered panel on the right */
.auth-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    align-items: stretch;
}

.auth-hero-bleed {
    flex: 1 1 58%;
    background-image: linear-gradient(180deg, rgba(72, 41, 122, 0.45), rgba(102, 126, 234, 0.25)), url("https://cdn.shopify.com/s/files/1/0619/0465/0468/files/216d0d29-056e-4fbd-a84f-8deb298ac67c_1.jpg?v=1766925150");
    background-size: cover;
    /* show left side of artwork (faces/composition) */
    background-position: left center;
    background-repeat: no-repeat;
    min-height: 100vh;
}

.auth-panel {
    flex: 1 1 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: transparent;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    border-radius: 16px;
    overflow: visible;
}

.auth-content {
    padding: 2.25rem 2.5rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.99));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Slightly increase logo size & spacing inside split card */
.auth-card.auth-card-split .auth-logo .logo-text {
    width: 56px;
    height: 56px;
    font-size: 1.35rem;
    border-radius: 12px;
}

.auth-card.auth-card-split .auth-logo h1 {
    font-size: 1.6rem;
}

/* Make divider overlay match white background area */
.auth-card.auth-card-split .divider::before,
.auth-card.auth-card-split .divider span {
    background: transparent;
}

/* Responsive: stack on small screens and hide hero */
@media (max-width: 760px) {
    .auth-card.auth-card-split {
        flex-direction: column;
        max-width: 480px;
    }
    .auth-hero {
        display: none;
    }
    .auth-content {
        width: 100%;
        padding: 1.75rem;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    width: 40px;
    height: 40px;
}

.logo-text {
    width: 48px;
    height: 48px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.auth-logo h1 {
    color: #667eea;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.auth-header h2 {
    color: #1a202c;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

/* Form Styles */
.auth-form {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1a202c;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #fafbff;
}

.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e53e3e;
}

.form-group input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #38a169;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #e53e3e;
}

.strength-fill.medium {
    width: 50%;
    background: #ed8936;
}

.strength-fill.strong {
    width: 75%;
    background: #38a169;
}

.strength-fill.very-strong {
    width: 100%;
    background: #2d3748;
}

.strength-text {
    font-size: 0.8rem;
    color: #666;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    /* visually hide native checkbox but keep it accessible */
    position: absolute;
    opacity: 0;
    width: 18px;
    height: 18px;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

.checkmark {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 2px; /* square corners (small radius) */
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.15s ease;
    vertical-align: middle;
}

.checkbox-label:hover .checkmark {
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Focus style for keyboard users */
.checkbox-label input[type="checkbox"]:focus + .checkmark {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-group .checkbox-label {
    /* align the square checkbox vertically with the label text */
    align-items: center;
    line-height: 1.4;
}

.checkbox-group .checkmark {
    /* remove top offset so checkbox vertically centers with text */
    margin-top: 0;
    flex-shrink: 0;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Button Styles - Override main.css for auth pages */
.auth-card .btn-primary {
    background: #667eea !important;
    color: white !important;
    padding: 14px 28px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.auth-card .btn-primary:hover {
    background: #5a67d8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.btn-full {
    width: 100%;
    margin-bottom: 1.5rem;
}

.btn-google {
    background: white;
    border: 2px solid #e2e8f0;
    color: #1a202c;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-google:hover {
    border-color: #667eea;
    background: #fafbff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

/* Divider */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    background: white;
    color: #6b7280;
    padding: 0 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

/* Footer */
.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: #6b7280;
    margin-bottom: 1rem;
    font-weight: 400;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.back-home {
    color: #6b7280 !important;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

.back-home:hover {
    color: #667eea !important;
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Messages */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid #feb2b2;
}

.success-message {
    background: #c6f6d5;
    color: #2f855a;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid #9ae6b4;
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-page {
        padding: 15px;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
}

/* Toast Container Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    border-left: 4px solid #667eea;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast.success {
    border-left-color: #38a169;
}

.toast.error {
    border-left-color: #e53e3e;
}

.toast.warning {
    border-left-color: #ed8936;
}

.toast-icon {
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #38a169;
}

.toast.error .toast-icon {
    color: #e53e3e;
}

.toast.warning .toast-icon {
    color: #ed8936;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #333;
}

.toast-message {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    margin-left: 8px;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.toast-close:hover {
    color: #666;
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
