/* ==========================================================================
   VoiceBills Modern Auth Page
   Split-screen layout with glassmorphism and animated gradients
   ========================================================================== */

/* Variables - VoiceBills Brand Colors */
:root {
    --auth-primary: #1a5276;
    --auth-primary-dark: #0f3d5c;
    --auth-accent: #2dd4bf;
    --auth-accent-light: #5eead4;
    --auth-success: #10b981;
    --auth-warning: #f59e0b;
    --auth-error: #ef4444;
    --auth-dark: #0a1628;
    --auth-darker: #050d18;
    --auth-card: rgba(10, 22, 40, 0.85);
    --auth-border: rgba(45, 212, 191, 0.15);
    --auth-text: #f8fafc;
    --auth-text-muted: #94a3b8;
    --auth-gradient-1: #1a5276;
    --auth-gradient-2: #0f3d5c;
    --auth-gradient-3: #2dd4bf;
    --auth-gradient-4: #5eead4;
}

/* Container */
.auth-container {
    display: flex;
    min-height: 100vh;
    background: var(--auth-darker);
    overflow: hidden;
}

/* ==========================================================================
   Left Panel - Brand
   ========================================================================== */

.auth-brand-panel {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: linear-gradient(135deg, var(--auth-dark) 0%, var(--auth-darker) 100%);
    overflow: hidden;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 480px;
}

.brand-logo {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
}

.logo-image {
    height: 60px;
    width: auto;
}

.brand-tagline h1 {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--auth-text);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.brand-tagline h1 br + * {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline p {
    font-size: 1.125rem;
    color: var(--auth-text-muted);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: var(--auth-text);
    font-size: 1rem;
}

.feature-item i {
    color: var(--auth-success);
    font-size: 1.125rem;
}

/* Testimonial */
.brand-testimonial {
    background: var(--auth-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    padding: 1.75rem;
}

.testimonial-content {
    position: relative;
    margin-bottom: 1.25rem;
}

.testimonial-content i {
    position: absolute;
    top: -0.5rem;
    left: -0.5rem;
    font-size: 1.5rem;
    color: var(--auth-primary);
    opacity: 0.5;
}

.testimonial-content p {
    color: var(--auth-text);
    font-size: 1rem;
    line-height: 1.7;
    padding-left: 1.5rem;
    margin: 0;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.author-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-accent) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info strong {
    color: var(--auth-text);
    font-size: 0.9375rem;
    font-weight: 600;
}

.author-info span {
    color: var(--auth-text-muted);
    font-size: 0.8125rem;
}

/* Animated Background Shapes */
.brand-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--auth-gradient-1);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--auth-gradient-3);
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--auth-gradient-4);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

/* ==========================================================================
   Right Panel - Forms
   ========================================================================== */

.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--auth-darker);
}

.form-container {
    width: 100%;
    max-width: 440px;
}

/* Tab Switcher */
.auth-tabs {
    display: flex;
    position: relative;
    background: var(--auth-card);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 2rem;
    border: 1px solid var(--auth-border);
}

.auth-tab {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--auth-text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
    border-radius: 8px;
}

.auth-tab.active {
    color: var(--auth-text);
}

.tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, var(--auth-accent) 0%, #14b8a6 100%);
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.3);
}

/* Form Styles */
.auth-form {
    animation: fadeIn 0.4s ease;
}

.auth-form h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.form-subtitle {
    color: var(--auth-text-muted);
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}

/* Method Tabs (Phone/Email) */
.method-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.method-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.method-tab:hover {
    border-color: var(--auth-primary);
    color: var(--auth-text);
}

.method-tab.active {
    background: linear-gradient(135deg, var(--auth-accent) 0%, #14b8a6 100%);
    border-color: transparent;
    color: var(--auth-dark);
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.3);
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    color: var(--auth-text);
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
    color: transparent;
}

/* Floating Labels */
.floating-label {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.2s ease;
    background: transparent;
    padding: 0 0.25rem;
}

.form-input:focus ~ .floating-label,
.form-input.has-value ~ .floating-label {
    top: 0;
    left: 1rem;
    font-size: 0.75rem;
    color: var(--auth-primary);
    background: var(--auth-darker);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 1rem;
    transition: color 0.2s ease;
}

.form-input:focus ~ .input-icon {
    color: var(--auth-primary);
}

.input-icon.clickable {
    right: 1rem;
    left: auto;
    cursor: pointer;
}

.input-icon.clickable:hover {
    color: var(--auth-text);
}

/* Code Input */
.code-input-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.code-digit {
    width: 52px;
    height: 60px;
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    color: var(--auth-text);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.code-digit:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Verification Sent */
.verification-sent {
    text-align: center;
    margin-bottom: 1.5rem;
}

.verification-sent p {
    color: var(--auth-text-muted);
    margin-bottom: 0.5rem;
}

.verification-sent strong {
    color: var(--auth-text);
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--auth-border);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--auth-text-muted);
    min-width: 50px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
    padding-left: 28px;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.checkbox-wrapper input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--auth-accent) 0%, #14b8a6 100%);
    border-color: transparent;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input:checked ~ .checkmark::after {
    display: block;
}

.checkbox-wrapper a {
    color: var(--auth-primary);
    text-decoration: none;
}

.checkbox-wrapper a:hover {
    text-decoration: underline;
}

.forgot-link {
    color: var(--auth-primary);
    font-size: 0.875rem;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-primary-gradient {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--auth-accent) 0%, #14b8a6 100%);
    border: none;
    border-radius: 12px;
    color: var(--auth-dark);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(45, 212, 191, 0.3);
}

.btn-primary-gradient:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 212, 191, 0.4);
}

.btn-primary-gradient:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-link,
.btn-text {
    background: transparent;
    border: none;
    color: var(--auth-primary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: opacity 0.2s;
}

.btn-link:hover,
.btn-text:hover {
    opacity: 0.8;
}

.btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
}

.resend-timer {
    text-align: center;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.divider span {
    color: var(--auth-text-muted);
    font-size: 0.8125rem;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-social {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    color: var(--auth-text);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.btn-social:hover {
    border-color: var(--auth-text-muted);
    background: rgba(255, 255, 255, 0.05);
}

.btn-social.google:hover {
    border-color: #4285f4;
}

.btn-social.apple:hover {
    border-color: white;
}

.btn-social i {
    font-size: 1.25rem;
}

/* Toast Messages */
.error-toast,
.success-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    animation: slideUp 0.3s ease;
    z-index: 1000;
    max-width: 90%;
}

.error-toast {
    background: var(--auth-error);
    color: white;
}

.success-toast {
    background: var(--auth-success);
    color: white;
}

.close-toast {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    margin-left: 0.5rem;
}

.close-toast:hover {
    opacity: 1;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 1rem);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-tabs {
        margin-bottom: 1.5rem;
    }

    .auth-tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .auth-form h2 {
        font-size: 1.5rem;
    }

    .code-input-group {
        gap: 0.5rem;
    }

    .code-digit {
        width: 44px;
        height: 52px;
        font-size: 1.25rem;
    }

    .social-buttons {
        flex-direction: column;
    }

    .method-cards {
        gap: 0.75rem;
    }

    .method-card {
        padding: 1rem;
    }
}

/* ==========================================================================
   Method Selection Cards
   ========================================================================== */

.method-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.method-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.method-card:hover {
    border-color: var(--auth-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(4px);
}

.method-card:hover .method-icon {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    color: white;
}

.method-card:hover > .fa-chevron-right {
    color: var(--auth-primary);
    transform: translateX(4px);
}

.method-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--auth-primary);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.method-info {
    flex: 1;
}

.method-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--auth-text);
    margin: 0 0 0.25rem 0;
}

.method-info p {
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    margin: 0;
}

.method-card > .fa-chevron-right {
    color: var(--auth-text-muted);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.btn-back:hover {
    color: var(--auth-text);
}

.btn-back i {
    font-size: 0.75rem;
}

/* Field Error */
.field-error {
    display: block;
    color: var(--auth-error);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    padding-left: 0.25rem;
}
