/* ============================================
   ZENTER AUTH - Shared Styles
   Used by: login.html & signup.html
   ============================================ */

   :root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --gray-900: #1e293b;
    --gray-800: #334155;
    --gray-700: #475569;
    --gray-600: #64748b;
    --gray-500: #94a3b8;
    --gray-400: #cbd5e1;
    --gray-300: #e2e8f0;
    --gray-200: #f1f5f9;
    --gray-100: #f8fafc;
    --white: #ffffff;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background: var(--dark);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   PAGE LAYOUT
   ============================================ */
.auth-page {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   LEFT BRAND PANEL
   ============================================ */
.auth-brand {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, #7c3aed 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    top: -200px;
    left: -200px;
    animation: floatShape 20s ease-in-out infinite;
}

.auth-brand::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    bottom: -100px;
    right: -100px;
    animation: floatShape 15s ease-in-out infinite reverse;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(5deg); }
    50% { transform: translate(-20px, 20px) rotate(-3deg); }
    75% { transform: translate(15px, 10px) rotate(2deg); }
}

.brand-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 480px;
    animation: brandFadeIn 1s ease-out;
}

@keyframes brandFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.brand-logo {
    font-family: 'Manrope', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.brand-logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-tagline {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0.95;
    font-family: 'Manrope', sans-serif;
    line-height: 1.3;
}

.brand-description {
    font-size: 1rem;
    opacity: 0.75;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

/* Feature pills */
.brand-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    animation: featurePop 0.5s ease-out backwards;
}

.brand-feature:nth-child(1) { animation-delay: 0.3s; }
.brand-feature:nth-child(2) { animation-delay: 0.4s; }
.brand-feature:nth-child(3) { animation-delay: 0.5s; }
.brand-feature:nth-child(4) { animation-delay: 0.6s; }

@keyframes featurePop {
    from { opacity: 0; transform: scale(0.8) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Testimonial card */
.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(10px);
    text-align: left;
    animation: featurePop 0.5s ease-out 0.4s backwards;
}

.testimonial-text {
    font-size: 0.95rem;
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 16px;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.testimonial-role {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ============================================
   RIGHT FORM PANEL
   ============================================ */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--white);
    position: relative;
    overflow-y: auto;
}

.auth-form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
    animation: formSlideIn 0.8s ease-out;
}

@keyframes formSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   FORM HEADER
   ============================================ */
.form-header {
    margin-bottom: 28px;
}

.form-header .mobile-logo {
    display: none;
    font-family: 'Manrope', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 24px;
    align-items: center;
    gap: 10px;
}

.mobile-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.form-header h1 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.form-header p {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin: 0;
}

/* ============================================
   FORM GROUPS
   ============================================ */
.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 18px;
    animation: fieldFadeIn 0.5s ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.15s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.25s; }
.form-group:nth-child(4) { animation-delay: 0.3s; }
.form-group:nth-child(5) { animation-delay: 0.35s; }
.form-group:nth-child(6) { animation-delay: 0.4s; }

@keyframes fieldFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.form-input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

/* Select */
.form-select {
    width: 100%;
    padding: 13px 40px 13px 44px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
    transition: var(--transition);
    outline: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    padding: 4px;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* Password strength */
.password-strength {
    margin-top: 8px;
    display: none;
}

.password-strength.visible {
    display: block;
    animation: fieldFadeIn 0.3s ease;
}

.strength-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: 0%;
}

.strength-fill.weak { width: 25%; background: var(--danger); }
.strength-fill.fair { width: 50%; background: var(--warning); }
.strength-fill.good { width: 75%; background: #3b82f6; }
.strength-fill.strong { width: 100%; background: var(--success); }

.strength-text { font-size: 0.75rem; font-weight: 500; }
.strength-text.weak { color: var(--danger); }
.strength-text.fair { color: var(--warning); }
.strength-text.good { color: #3b82f6; }
.strength-text.strong { color: var(--success); }

/* ============================================
   FORM OPTIONS
   ============================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    animation: fieldFadeIn 0.5s ease-out 0.4s backwards;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   CHECKBOX
   ============================================ */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-input { display: none; }

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 1px;
}

.checkbox-input:checked + .checkbox-custom {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
}

.checkbox-input:checked + .checkbox-custom svg {
    opacity: 1;
    transform: scale(1);
}

.checkbox-custom svg {
    width: 12px;
    height: 12px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition-bounce);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-label a:hover { text-decoration: underline; }

.terms-group {
    margin-bottom: 24px;
    animation: fieldFadeIn 0.5s ease-out 0.45s backwards;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */
.submit-btn {
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: fieldFadeIn 0.5s ease-out 0.5s backwards;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-dark), #7c3aed);
    opacity: 0;
    transition: opacity 0.2s;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.submit-btn:hover:not(:disabled)::before { opacity: 1; }
.submit-btn:active:not(:disabled) { transform: translateY(0); }

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.submit-btn .btn-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.submit-btn.loading .spinner { display: block; }
.submit-btn.loading .btn-text { display: none; }
.submit-btn.loading .btn-content svg { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   DIVIDER
   ============================================ */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    animation: fieldFadeIn 0.5s ease-out 0.55s backwards;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-300);
}

.divider span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ============================================
   SOCIAL LOGIN
   ============================================ */
.social-login {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    animation: fieldFadeIn 0.5s ease-out 0.6s backwards;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--gray-700);
    transition: var(--transition);
}

.social-btn:hover {
    border-color: var(--gray-400);
    background: var(--gray-100);
    transform: translateY(-1px);
}

.social-btn svg { width: 20px; height: 20px; }

/* ============================================
   ERROR MESSAGE
   ============================================ */
.error-message {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
    color: var(--danger);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 20px;
    animation: shakeError 0.4s ease;
}

.error-message.visible { display: flex; }

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.error-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ============================================
   FOOTER
   ============================================ */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    animation: fieldFadeIn 0.5s ease-out 0.65s backwards;
}

.auth-footer p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.security-badge svg { width: 14px; height: 14px; }

/* ============================================
   SUCCESS OVERLAY
   ============================================ */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 100;
}

.success-overlay.visible {
    display: flex;
    animation: successFadeIn 0.5s ease;
}

@keyframes successFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.success-checkmark svg {
    width: 36px;
    height: 36px;
    color: white;
    animation: checkDraw 0.3s ease 0.3s backwards;
}

@keyframes checkDraw {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.success-text {
    font-family: 'Manrope', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.success-subtext {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .auth-brand { display: none; }
    .auth-form-panel { padding: 24px; }
    .form-header .mobile-logo { display: flex; }
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding: 20px;
        align-items: flex-start;
        padding-top: 40px;
    }
    .form-header h1 { font-size: 1.5rem; }
    .form-row { flex-direction: column; gap: 0; }
    .social-login { flex-direction: column; }
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.form-input:focus-visible,
.form-select:focus-visible,
.submit-btn:focus-visible,
.social-btn:focus-visible,
.password-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}