:root {
    --primary-color: #12bae5;
    --primary-gradient: linear-gradient(135deg, #12bae5 0%, #12bae5c4 100%);
    --secondary-color: #6c757d;
    --buyer-color: #12bae5;
    --seller-color: #198754;
    --radius: 12px;
    --border: #e2e8f0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* UPDATED: Better Width Balance - Left 30%, Right 70% */
.auth-wrapper {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
    display: flex;
}

/* Left Side - Branding (30% width) */
.auth-banner {
    flex: 0 0 40%;
    background: var(--primary-gradient);
    padding: 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-banner::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

.banner-content {
    position: relative;
    z-index: 10;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 1rem;
}

.feature-icon {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Right Side - Form (70% width) */
.auth-form-container {
    flex: 1;
    padding: 45px 50px;
    position: relative;
    overflow-y: auto;
    max-height: 700px;
}

.auth-form-container::-webkit-scrollbar {
    width: 6px;
}

.auth-form-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.auth-form-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.auth-form-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.back-home {
    position: absolute;
    top: 20px;
    right: 20px;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.back-home:hover {
    color: var(--primary-color);
}

.form-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.form-subtitle {
    color: #6c757d;
    margin-bottom: 30px;
}

.form-control-lg {
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control-lg:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.btn-auth {
    background: var(--primary-gradient);
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

.otp-input-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.otp-input {
    width: 100%;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    font-weight: 700;
    background: #f8f9fa;
}

.otp-input:focus {
    background: #fff;
    border-color: var(--primary-color);
    outline: none;
}

/* Role Selection Styles */
.role-selection {
    text-align: center;
}

.role-options {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.role-card {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.role-card.buyer:hover {
    border-color: var(--buyer-color);
}

.role-card.seller:hover {
    border-color: var(--seller-color);
}

.role-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.role-icon.buyer {
    background: linear-gradient(135deg, #12bae5 0%, #12bae5c4 100%);
    color: white;
}

.role-icon.seller {
    background: linear-gradient(135deg, #198754 0%, #0f5132 100%);
    color: white;
}

.role-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.role-desc {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.back-btn {
    background: none;
    border: none;
    color: #6c757d;
    padding: 0;
    margin-bottom: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-btn:hover {
    color: var(--primary-color);
}

/* Success Message */
.success-message {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.5s ease;
}

.success-message.fade-out {
    opacity: 0;
}

.success-message i {
    font-size: 1.2rem;
}

/* Mobile Input Group */
.mobile-input-group {
    position: relative;
}

.mobile-input-group .input-group-text {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 3;
    border-radius: 10px 0 0 10px;
}

.mobile-input-group .form-control {
    padding-left: 55px;
}

/* Input with icon styles */
.position-relative {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 4;
    pointer-events: none;
}

.input-with-icon {
    padding-left: 45px !important;
    position: relative;
    z-index: 3;
}

.input-with-icon:focus {
    z-index: 3;
}

.form-control:focus {
    position: relative;
    z-index: 3;
}

.input-group > .form-control:focus {
    z-index: 0;
}

.mobile-input {
    border-bottom-left-radius: 0 !important;
    border-top-left-radius: 0 !important;
}

.mobile-input-group .form-control {
    padding-left: 55px;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: 0;
}

.mobile-input-group .input-group-text {
    border-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Alert Styles */
.alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
}

.alert-danger i {
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    border: none;
}

.alert-warning i {
    color: #856404;
}

.text-primary {
    --bs-text-opacity: 1;
    color: rgb(93, 207, 237) !important;
}

.btn:hover {
    color: var(--bs-btn-hover-color);
    background-color: #41c8ea;
    border-color: #41c8ea;
}

#resendBtn:hover {
    background-color: #fff !important;
    border-color: #fff !important;
    color: #40c7ea !important;
}

.btn-outline-primary {
    --bs-btn-color: #41c8ea;
    --bs-btn-border-color: #41c8ea;
}

/* Validation Styles */
.input-error {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.is-invalid {
    border-color: #dc3545 !important;
}

.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.is-valid {
    border-color: #198754 !important;
}

.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* GST Validation Message */
.gst-validation-msg {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Section */
.form-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
    border: 2px solid var(--border);
}

/* Address Grid - 2x2 Layout */
.address-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.address-field {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 991px) {
    .auth-wrapper {
        flex-direction: column;
        max-width: 500px;
    }

    .auth-banner {
        flex: 0 0 auto;
        padding: 30px;
        min-height: 200px;
    }

    .auth-form-container {
        padding: 30px;
    }

    .role-options {
        flex-direction: column;
    }

    .address-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .auth-form-container {
        padding: 20px;
    }

    .form-section {
        padding: 20px;
    }
}