/* ============================================
   Modern Auth Pages Styles
   ============================================ */

:root {
    --auth-primary: #c99349;
    --auth-primary-dark: #553509;
    --auth-success: #28a745;
    --auth-danger: #dc3545;
    --auth-text: #553509;
    --auth-text-light: #6c757d;
    --auth-border: #e0e0e0;
    --auth-bg: #f8f9fa;
    --auth-white: #ffffff;
    --auth-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --auth-shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.15);
    --auth-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Auth Section */
.auth-section {
    min-height: 100vh;
    background: #c99349 !important;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.auth-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--auth-white);
    border-radius: 24px;
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    min-height: 700px;
}

/* Branding Side */
.auth-branding {
    background: linear-gradient(135deg, #c99349 0%, #553509 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow: hidden;
}

.branding-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0.5;
}

.branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.brand-logo-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.brand-logo-link:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.brand-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
    overflow: hidden;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}


.brand-logo i {
    font-size: 3rem;
    color: white;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: var(--auth-transition);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.feature-item i {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

/* Form Side */
.auth-form-wrapper {
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.auth-form-card {
    width: 100%;
    max-width: 500px;
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.3);
    animation: float 3s ease-in-out infinite;
}

.auth-icon i {
    font-size: 2rem;
    color: white;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--auth-text-light);
    font-size: 0.95rem;
}

/* Account Type Selection */
.account-type-selection {
    margin-bottom: 2rem;
}

.selection-label {
    display: block;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.type-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.type-card-wrapper {
    position: relative;
}

.type-card-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    border: 2px solid var(--auth-border);
    border-radius: 16px;
    background: var(--auth-white);
    cursor: pointer;
    transition: var(--auth-transition);
    position: relative;
    text-align: center;
}

.type-card:hover {
    border-color: var(--auth-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.15);
}

.type-card-wrapper input[type="radio"]:checked + .type-card {
    border-color: var(--auth-primary);
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(61, 79, 96, 0.05) 100%);
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

.type-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: var(--auth-transition);
}

.type-card-customer .type-card-icon {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(23, 162, 184, 0.2) 100%);
    color: var(--auth-primary);
}

.type-card-merchant .type-card-icon {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.2) 100%);
    color: var(--auth-success);
}

.type-card-wrapper input[type="radio"]:checked + .type-card .type-card-icon {
    transform: scale(1.1);
}

.type-card-icon i {
    font-size: 1.75rem;
}

.type-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 0.5rem;
}

.type-card-desc {
    font-size: 0.85rem;
    color: var(--auth-text-light);
    margin: 0;
    line-height: 1.4;
}

.type-card-check {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 24px;
    height: 24px;
    background: var(--auth-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: var(--auth-transition);
}

.type-card-wrapper input[type="radio"]:checked + .type-card .type-card-check {
    opacity: 1;
    transform: scale(1);
}

.type-card-check i {
    font-size: 0.75rem;
    color: white;
}

/* Form Fields */
.form-fields-group {
    margin-bottom: 1.5rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.field-label-icon {
    color: var(--auth-primary);
    font-size: 0.9rem;
}

.field-required {
    color: var(--auth-danger);
    margin-left: 0.25rem;
}

.field-optional {
    color: var(--auth-text-light);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--auth-border);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: var(--auth-transition);
    background: var(--auth-white);
    color: var(--auth-text);
}

.form-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(23, 162, 184, 0.1);
}

.form-input.is-invalid {
    border-color: var(--auth-danger);
}

.form-input::placeholder {
    color: var(--auth-text-light);
    opacity: 0.6;
}

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--auth-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.form-input:focus ~ .input-focus-line {
    width: 100%;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    padding-top: 0.875rem;
}

.password-toggle-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-light);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--auth-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: var(--auth-primary);
}

.field-hint {
    display: block;
    color: var(--auth-text-light);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.field-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.field-error i {
    font-size: 0.875rem;
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--auth-text);
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--auth-border);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 0.15rem;
    position: relative;
    transition: var(--auth-transition);
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.checkbox-label {
    flex: 1;
    line-height: 1.5;
}

.checkbox-link {
    color: var(--auth-primary) !important;
    text-decoration: none;
    font-weight: 500;
    transition: var(--auth-transition);
}

.checkbox-link:hover {
    text-decoration: underline;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.forgot-link {
    color: var(--auth-primary) !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--auth-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.forgot-link:hover {
    color: var(--auth-primary-dark);
    background: rgba(23, 162, 184, 0.1);
    text-decoration: none;
    transform: translateX(-2px);
}

.forgot-link i {
    font-size: 0.85rem;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--auth-transition);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.auth-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.auth-submit-btn:hover::before {
    left: 100%;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.4);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-loader {
    display: none;
}

.auth-submit-btn.loading .btn-content {
    opacity: 0;
}

.auth-submit-btn.loading .btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.auth-submit-btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.divider-text {
    color: var(--auth-text-light);
    font-size: 0.85rem;
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border: 2px solid var(--auth-border);
    border-radius: 12px;
    background: var(--auth-white);
    color: var(--auth-text);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--auth-transition);
}

.social-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-google {
    border-color: #db4437;
    color: #db4437;
}

.social-google:hover:not(:disabled) {
    background: #db4437;
    color: white;
    border-color: #db4437;
}

.social-facebook {
    border-color: #4267B2;
    color: #4267B2;
}

.social-facebook:hover:not(:disabled) {
    background: #4267B2;
    color: white;
    border-color: #4267B2;
}

.social-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.social-btn i {
    font-size: 1.1rem;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--auth-border);
}

.footer-text {
    color: var(--auth-text-light);
    font-size: 0.9rem;
    margin: 0;
}

.footer-link {
    color: var(--auth-primary) !important;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: var(--auth-transition);
}

.footer-link:hover {
    text-decoration: underline;
}

/* Alert */
.alert-success-custom {
    padding: 1rem 1.25rem;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 12px;
    color: #155724;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

/* Info Message */
.info-message {
    padding: 1rem 1.25rem;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.info-message i {
    color: var(--auth-primary);
    font-size: 1.1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.info-message p {
    margin: 0;
    color: var(--auth-text);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Verify Actions */
.verify-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.verify-form {
    width: 100%;
}

.auth-logout-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: 2px solid var(--auth-border);
    border-radius: 12px;
    color: var(--auth-text);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--auth-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logout-btn:hover {
    background: var(--auth-bg);
    border-color: var(--auth-text-light);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 992px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-branding {
        display: none;
    }

    .auth-form-wrapper {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .auth-section {
        padding: 1rem 0;
    }

    .auth-wrapper {
        border-radius: 16px;
        min-height: auto;
    }

    .auth-form-wrapper {
        padding: 1.5rem 1rem;
    }

    .auth-icon {
        width: 60px;
        height: 60px;
    }

    .auth-icon i {
        font-size: 1.5rem;
    }

    .auth-title {
        font-size: 1.75rem;
    }

    .type-cards {
        grid-template-columns: 1fr;
    }

    .social-login {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 0 0.5rem;
    }

    .auth-form-wrapper {
        padding: 1rem;
    }

    .brand-title {
        font-size: 2rem;
    }

    .brand-subtitle {
        font-size: 1rem;
    }
}

/* RTL Support */
[dir="rtl"] .field-label-icon {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .password-toggle-btn {
    left: 1rem;
    right: auto;
}

[dir="rtl"] .type-card-check {
    left: 0.75rem;
    right: auto;
}

[dir="rtl"] .btn-arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .auth-submit-btn:hover .btn-arrow {
    transform: scaleX(-1) translateX(-5px);
}

