/* ============================================
   TBVS SHOP - AUTH PAGES STYLES
   Modern Login & Register Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ========== CSS VARIABLES ========== */
:root {
    /* Gradient Colors - High Contrast */
    --auth-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --auth-gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --auth-gradient-overlay: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);

    /* Colors */
    --auth-primary: #5a67d8;
    --auth-text-dark: #1a202c;
    --auth-text-light: #ffffff;
    --auth-bg-light: #f7fafc;

    /* Shadows */
    --auth-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --auth-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ========== AUTH CONTAINER ========== */
.auth-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

h2.auth-cover-title {
    color: white !important;
}

/* Animated Background Pattern - OPTIMIZED */
.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    /* REMOVED: Heavy animation that causes performance issues */
    /* animation: backgroundMove 20s ease-in-out infinite; */
}

/* REMOVED: Expensive animation
@keyframes backgroundMove {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, 20px);
    }
}
*/

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* ========== AUTH CARD ========== */
.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    /* Reduced from 20px */
    border-radius: 24px;
    box-shadow: var(--auth-shadow-xl);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    /* OPTIMIZED: Simpler animation */
    animation: fadeIn 0.4s ease-out;
}

/* Simpler fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========== AUTH COVER (Image Side) ========== */
.auth-cover {
    background: var(--auth-gradient-overlay);
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 3rem;
    overflow: hidden;
}

.auth-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

/* Floating Icons Animation - REMOVED for performance */
/* SECURITY: Removed decorative animations that cause unnecessary repaints */
/*
.auth-cover::after {
    content: '🚿';
    position: absolute;
    font-size: 4rem;
    opacity: 0.1;
    top: 20%;
    right: 10%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}
*/

.auth-cover-content {
    position: relative;
    z-index: 2;
    color: var(--auth-text-light);
}

.auth-cover-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.auth-cover-content p {
    font-size: 1.125rem;
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Feature List */
.auth-features {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.auth-features li i {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ========== AUTH FORM ========== */
.auth-form {
    padding: 3rem;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-form-header h3 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--auth-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-form-header p {
    color: #718096;
    font-size: 1rem;
}

/* Form Controls */
.form-group-auth {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label-auth {
    font-weight: 600;
    color: var(--auth-text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    display: block;
}

.form-control-auth {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.form-control-auth:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(90, 103, 216, 0.1);
    transform: translateY(-1px);
}

.form-control-auth::placeholder {
    color: #a0aec0;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #718096;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--auth-primary);
}

/* Checkbox */
.form-check-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-auth input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    cursor: pointer;
}

.form-check-auth label {
    color: #4a5568;
    font-size: 0.9375rem;
    cursor: pointer;
    user-select: none;
}

/* ========== BUTTONS ========== */
.btn-auth-primary {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--auth-gradient-primary);
    color: var(--auth-text-light);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(90, 103, 216, 0.3);
    position: relative;
    overflow: hidden;
}

/* REMOVED: Expensive shine animation that causes repaints */
/*
.btn-auth-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-auth-primary:hover::before {
    left: 100%;
}
*/

.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(90, 103, 216, 0.4);
    filter: brightness(1.05);
    /* Simple brightness instead of shine */
}

.btn-auth-primary:active {
    transform: translateY(0);
}

/* Social Login Buttons */
.btn-social-auth {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #4a5568;
}

.btn-social-auth:hover {
    background: #f7fafc;
    border-color: var(--auth-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-social-auth img {
    width: 20px;
    height: 20px;
}

/* ========== DIVIDER ========== */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
    padding: 0 1rem;
    color: #a0aec0;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ========== ALERTS ========== */
.alert-auth {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-auth-success {
    background: rgba(72, 187, 120, 0.1);
    border: 2px solid rgba(72, 187, 120, 0.3);
    color: #276749;
}

.alert-auth-danger {
    background: rgba(245, 101, 101, 0.1);
    border: 2px solid rgba(245, 101, 101, 0.3);
    color: #c53030;
}

.alert-auth ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* ========== LINKS ========== */
.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-link:hover {
    color: #4c51bf;
    text-decoration: underline;
}

.auth-text-muted {
    color: #718096;
    font-size: 0.9375rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
    .auth-cover {
        display: none;
    }

    .auth-form {
        padding: 2rem 1.5rem;
    }

    .auth-form-header h3 {
        font-size: 1.75rem;
    }

    .auth-cover-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .auth-container {
        padding: 1rem 0.5rem;
    }

    .auth-card {
        border-radius: 16px;
    }

    .auth-form {
        padding: 1.5rem 1rem;
    }

    .auth-form-header h3 {
        font-size: 1.5rem;
    }

    .btn-auth-primary {
        padding: 0.875rem 1.5rem;
    }
}

/* ========== LOADING STATE ========== */
.btn-auth-primary.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-auth-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ========== UTILITIES ========== */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.gap-2 {
    gap: 1rem;
}

.w-100 {
    width: 100%;
}