/* =====================================================
   TIJARS - Authentication Pages Styles
   ===================================================== */

/* Auth Body */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Auth Container */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1200px;
    min-height: 700px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

/* Left Branding Panel */
.auth-branding {
    position: relative;
    background: linear-gradient(135deg, #1E7C8A 0%, #0D4A52 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.branding-bg {
    position: absolute;
    inset: 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.05'%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.5;
}

.branding-content {
    position: relative;
    z-index: 1;
}

.auth-logo .logo-img {
    height: 40px;
    filter: brightness(0) invert(1);
    margin-bottom: 2rem;
}

.branding-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.branding-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.branding-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.brand-stat {
    display: flex;
    flex-direction: column;
}

.brand-stat .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #A4D65E;
}

.brand-stat .stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.feature-item svg {
    color: #A4D65E;
    flex-shrink: 0;
}

/* Right Form Panel */
.auth-form-panel {
    background: #fff;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.auth-logo-mobile {
    display: none;
}

.auth-logo-mobile .logo-img {
    height: 36px;
    margin-bottom: 2rem;
}

.auth-form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a2a4a;
    margin-bottom: 0.5rem;
}

.auth-form-header p {
    color: #64748b;
    font-size: 0.95rem;
}

/* Wallet Buttons */
.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.wallet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a2a4a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallet-btn:hover {
    border-color: #1E7C8A;
    background: rgba(30, 124, 138, 0.05);
    transform: translateY(-2px);
}

.wallet-btn.phantom:hover {
    border-color: #AB9FF2;
    background: rgba(171, 159, 242, 0.1);
}

.wallet-btn.solflare:hover {
    border-color: #FC7227;
    background: rgba(252, 114, 39, 0.1);
}

.wallet-btn svg {
    flex-shrink: 0;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    font-size: 0.85rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper svg {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #1a2a4a;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #1E7C8A;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30, 124, 138, 0.1);
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #94a3b8;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #1E7C8A;
}

/* Password Strength */
.password-strength {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #94a3b8;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-bar.weak span {
    width: 33%;
    background: #ef4444;
}

.strength-bar.medium span {
    width: 66%;
    background: #f59e0b;
}

.strength-bar.strong span {
    width: 100%;
    background: #22c55e;
}

.strength-text {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input:checked+.checkmark {
    background: #1E7C8A;
    border-color: #1E7C8A;
}

.checkbox-label input:checked+.checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.terms-checkbox {
    flex-wrap: wrap;
}

.terms-checkbox a {
    color: #1E7C8A;
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

.forgot-link {
    font-size: 0.875rem;
    color: #1E7C8A;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.auth-form .btn-primary {
    margin-top: 0.5rem;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.auth-form .btn-block {
    width: 100%;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.auth-footer p {
    color: #64748b;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #1E7C8A;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-terms {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-terms p {
    font-size: 0.75rem;
    color: #94a3b8;
}

.auth-terms a {
    color: #64748b;
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .auth-branding {
        display: none;
    }

    .auth-logo-mobile {
        display: block;
        text-align: center;
    }

    .auth-form-panel {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .auth-body {
        padding: 0;
        align-items: flex-start;
    }

    .auth-container {
        border-radius: 0;
        min-height: 100vh;
    }

    .auth-form-panel {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .wallet-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error State */
.form-group.error .input-wrapper input {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-group .error-message {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.25rem;
}

/* Success Toast */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: #1a2a4a;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #22c55e;
}

.toast.error {
    background: #ef4444;
}

/* Wallet Button States */
.wallet-btn .spinner {
    animation: spin 1s linear infinite;
}

.wallet-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}