:root {
    --success-color: #28a745;
}

.auth-container {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background-color: #f9fafb;
}

.auth-wrapper {
    width: 100%;
    max-width: 650px;
}

.auth-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    margin-top: 2rem;
}

.auth-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #8a56ff;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #6c757d;
    margin-bottom: 0;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    width: 80px;
    height: 80px;
}

.auth-body {
    padding: 0 2rem 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 1rem;
    color: #6c757d;
}

.form-control {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 2.5rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #8a56ff;
    box-shadow: 0 0 0 0.2rem rgba(138, 86, 255, 0.2);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.col-md-6 {
    position: relative;
    width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.form-check {
    display: flex;
    align-items: flex-start;
}

.form-check-input {
    margin-left: 0.5rem;
    margin-top: 0.25rem;
}

.terms-check {
    margin-bottom: 1.5rem;
}

.form-check-label {
    font-size: 0.875rem;
    color: #495057;
}

.form-check-label a {
    color: #8a56ff;
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

.validation-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.auth-actions {
    margin-bottom: 1rem;
}

.btn-block {
    display: block !important;
    width: 100% !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
}

.auth-footer {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.auth-footer p {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

.auth-footer a {
    color: #8a56ff;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.spinner-border {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
}

/* Submit button states */
.btn-primary:disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-primary:disabled:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    transform: none !important;
}

/* Alert styling */
.alert {
    position: relative;
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-danger {
    background-color: rgba(255, 73, 73, 0.1);
    border: 1px solid rgba(255, 73, 73, 0.5);
    color: #ff4949;
}

.alert-success {
    background-color: rgba(75, 201, 89, 0.1);
    border: 1px solid rgba(75, 201, 89, 0.5);
    color: #4bc959;
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-content {
    flex: 1;
    padding-top: 0.125rem;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.shake {
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Country Select Styling */
.country-select {
    font-size: 0.875rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 16px 12px;
}

/* Custom Country Select with Flags */
.custom-country-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-country-select {
    position: relative;
    width: calc(100% - 1rem);
    margin-left: 1rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-country-select:hover {
    border-color: #8a56ff;
}

.selected-country {
    display: flex;
    align-items: center;
    padding: 0.89rem;
    gap: 0.75rem;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: #6c757d;
}

.custom-country-select.active .dropdown-arrow {
    transform: rotate(180deg);
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.country-dropdown.show {
    display: block;
}

.country-option {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
}

.country-option:hover {
    background-color: #f8f9fa;
}

.country-option.selected {
    background-color: #8a56ff;
    color: white;
}

.country-option.selected:hover {
    background-color: #7a46ef;
}

.hidden-select {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .flag-icon {
        width: 18px;
        height: 14px;
    }
    
    .selected-country {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .country-option {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    /* Adjust column layouts for mobile */
    .col-5, .col-7 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Remove margin in mobile view since columns are stacked */
    .custom-country-select {
        width: 100%;
        margin-right: 0;
    }
}

/* Modern File Upload Styling */
.file-upload-area {
    border: 2px dashed #ced4da;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-area:hover {
    border-color: #8a56ff;
    background: rgba(138, 86, 255, 0.05);
    transform: translateY(-1px);
}

.file-upload-area.drag-over {
    border-color: #8a56ff;
    background: rgba(138, 86, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.file-upload-content {
    width: 100%;
    text-align: center;
    padding: 1rem;
    pointer-events: none;
}

.file-upload-placeholder {
    color: #6c757d;
}

.file-upload-placeholder h4 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.file-upload-placeholder p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #adb5bd;
}

.file-types {
    font-size: 0.8rem;
    color: #ced4da;
    display: block;
    margin-top: 0.5rem;
}

.file-upload-icon {
    font-size: 2.5rem;
    color: #8a56ff;
    margin-bottom: 0.5rem;
}

.file-upload-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #28a745;
    font-weight: 500;
    position: relative;
}

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

.btn-remove-file {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    pointer-events: auto;
}

.btn-remove-file:hover {
    background: #c82333 !important;
    transform: scale(1.1) !important;
}

.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

/* File upload responsive */
@media (max-width: 768px) {
    .file-upload-area {
        min-height: 100px;
    }
    
    .file-upload-placeholder h4 {
        font-size: 1rem;
    }
    
    .file-upload-placeholder p {
        font-size: 0.8rem;
    }
    
    .file-upload-icon {
        font-size: 2rem;
    }
}

/* Password Strength Indicator Styles */
.password-strength-container {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    /* Add transform for smoother animations */
    transform: translateZ(0);
    will-change: transform;
}

.password-strength-bar {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    margin-bottom: 0.25rem;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    border-radius: 3px;
    /* Optimize transition for better performance */
    transition: width 0.15s ease-in-out;
    transform: translateZ(0);
    will-change: width;
}

.password-strength-fill.very-weak {
    background-color: #dc3545;
}

.password-strength-fill.weak {
    background-color: #fd7e14;
}

.password-strength-fill.medium {
    background-color: #ffc107;
}

.password-strength-fill.strong {
    background-color: #28a745;
}

.password-strength-fill.very-strong {
    background-color: #20c997;
}

.password-strength-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.password-strength-text.very-weak {
    color: #dc3545;
}

.password-strength-text.weak {
    color: #fd7e14;
}

.password-strength-text.medium {
    color: #ffc107;
}

.password-strength-text.strong {
    color: #28a745;
}

.password-strength-text.very-strong {
    color: #20c997;
}

.password-strength-text i {
    font-size: 1rem;
}

.password-requirements {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #adb5bd;
}

.password-requirements .requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.password-requirements .requirement i {
    font-size: 0.8rem;
}

.password-requirements .requirement.met {
    color: #28a745;
}

.password-requirements .requirement.unmet {
    color: #dc3545;
}

.password-match-indicator {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
    /* Add transform for smoother animations */
    transform: translateZ(0);
    will-change: transform;
    transition: all 0.15s ease-in-out;
}

.password-match-indicator.match {
    color: #28a745;
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.password-match-indicator.no-match {
    color: #dc3545;
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.password-match-indicator i {
    font-size: 1rem;
}

.password-toggle-btn {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: #8a56ff;
}

/* Adjust input group for password fields */
.input-group {
    position: relative;
}

.input-group .form-control {
    padding-left: 1rem;
    padding-right: 3rem;
}

/* Ensure password fields have proper spacing */
.input-group:has(.password-toggle-btn) .form-control {
    padding-left: 1rem;
    padding-right: 3rem;
}