.db-type-selection-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.db-type-selection-card h4 {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.db-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.db-type-option {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 1.25rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.db-type-option:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.db-type-option.selected {
    background: white;
    border-color: white;
    color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.db-type-option i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.db-type-option .db-type-name {
    font-weight: 600;
    font-size: 0.875rem;
}

#dynamicFormSections {
    display: none;
}

#dynamicFormSections.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 0.35rem 0.35rem 0 0;
    margin: -1rem -1rem 1.5rem -1rem;
}

.section-header-gradient h5 {
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.section-header-gradient h5 i {
    margin-right: 0.75rem;
}

.db-specific-fields {
    background: #f8f9fc;
    border-left: 4px solid #4e73df;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.db-specific-fields h6 {
    color: #4e73df;
    font-weight: 700;
    margin-bottom: 1rem;
}

.apps-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e3e6f0;
    border-radius: 0.375rem;
    padding: 0.5rem;
    background: white;
}

.app-item, .database-item, .backup-item {
    background: #f8f9fc;
    border: 1px solid #e3e6f0;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.app-item:hover, .database-item:hover, .backup-item:hover {
    background: #e9ecf4;
    border-color: #4e73df;
}

.app-item:last-child, .database-item:last-child, .backup-item:last-child {
    margin-bottom: 0;
}

.item-name {
    font-weight: 600;
    color: #5a5c69;
}

.remove-item-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.add-item-btn {
    width: 100%;
    border: 2px dashed #4e73df;
    background: rgba(78, 115, 223, 0.05);
    color: #4e73df;
    font-weight: 600;
    transition: all 0.2s ease;
}

.add-item-btn:hover {
    background: rgba(78, 115, 223, 0.1);
    border-color: #224abe;
    color: #224abe;
}

.item-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #4e73df;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.field-required-alert {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.field-required-alert i {
    margin-right: 0.5rem;
}

.vm-selection-container {
    background: #e7f3ff;
    border: 2px solid #4e73df;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.vm-selection-container.no-vm {
    background: #fff3cd;
    border-color: #f6c23e;
}

.vm-info-display {
    background: white;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.vm-info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e3e6f0;
}

.vm-info-item:last-child {
    border-bottom: none;
}

.vm-info-label {
    font-weight: 600;
    color: #858796;
    font-size: 0.875rem;
}

.vm-info-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #858796;
    font-size: 0.8rem;
}

.vm-info-label i {
    font-size: 0.75rem;
    width: 16px;
}

.vm-info-value {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #5a5c69;
    word-break: break-all;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4e73df;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .db-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .db-type-option {
        padding: 1rem 0.5rem;
    }
    
    .db-type-option i {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .db-type-grid {
        grid-template-columns: 1fr;
    }
}

.h-100 {
    height: 100% !important;
}

.col-lg-6 .apps-list {
    max-height: 250px;
    min-height: 200px;
}

.vm-result-item {
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
}

.vm-result-item:hover {
    background-color: #f8f9fc !important;
    border-left-color: #4e73df;
}

.vm-result-item h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #5a5c69;
}

.vm-result-item small {
    font-size: 0.75rem;
    color: #858796;
}

.vm-result-item .fa-chevron-right {
    font-size: 0.875rem;
    opacity: 0.5;
}

#serverName[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
    border-color: #4e73df;
    font-weight: 600;
    color: #495057;
}

#backupsList {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e3e6f0;
    border-radius: 0.375rem;
    padding: 0.75rem;
    background: white;
}

.backup-item {
    background: #f8f9fc;
    border: 1px solid #e3e6f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.backup-item > .d-flex {
    margin-bottom: 0.75rem;
    align-items: flex-end !important;
}

.backup-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4e73df;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.backup-item .remove-backup-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.backup-item .remove-backup-btn:hover {
    background-color: #e74a3b;
    transform: scale(1.05);
}

.backup-item .remove-backup-btn i {
    font-size: 0.875rem;
}

.backup-item:last-child {
    margin-bottom: 0;
}

.backup-label {
    font-size: 0.75rem;
    margin-bottom: 0.35rem;
    color: #5a5c69;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.backup-item .form-control-sm {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d3e2;
    transition: all 0.2s ease;
}

.backup-item .form-control-sm:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.15);
}

.alert-info {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #e7f3ff 0%, #d6ebff 100%);
    border: 1px solid #4e73df;
    border-radius: 0.5rem;
    color: #2c5aa0;
}

.alert-info i {
    color: #4e73df;
}

.add-item-btn {
    font-size: 0.875rem;
    padding: 0.6rem 1rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .backup-item .col-md-3 {
        margin-bottom: 0.75rem;
    }
    
    .backup-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .backup-item {
        padding: 0.75rem;
    }
    
    .backup-label {
        font-size: 0.7rem;
    }
    
    .backup-item .form-control-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

input[type="text"].form-control {
    text-align: left;
}

.input-group .no-spinners::-webkit-outer-spin-button,
.input-group .no-spinners::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-group .no-spinners[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

input[type="number"].text-center::placeholder {
    text-align: center;
}

.bd-count-readonly::-webkit-outer-spin-button,
.bd-count-readonly::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bd-count-readonly[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.bd-count-readonly {
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f7ff 100%) !important;
    border: 2px solid #4e73df !important;
    font-weight: 700 !important;
    color: #2c5aa0 !important;
    cursor: not-allowed !important;
    text-align: center !important;
    font-size: 1.1rem !important;
    user-select: none !important;
}

.bd-count-readonly:focus {
    outline: none !important;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25) !important;
}

.fa-link[title] {
    cursor: help;
}

@keyframes pulseUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.bd-count-readonly.updated {
    animation: pulseUpdate 0.3s ease;
}

.no-spinners::-webkit-outer-spin-button,
.no-spinners::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.no-spinners[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.text-center input.form-control,
.text-center select.form-control {
    text-align: center;
}

label.text-center {
    display: block;
    text-align: center;
}

.input-group .unit-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    border: none;
    min-width: 50px;
    justify-content: center;
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.input-group input[type="number"] {
    border-right: none;
}

.input-group input[type="number"]:focus {
    box-shadow: none;
    border-color: #667eea;
}

.input-group input[type="number"]:focus + .input-group-append .unit-label {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#dbConfigSection .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

#dbConfigSection .col-md-3 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

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

@media (max-width: 576px) {
    #dbConfigSection .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.action-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.btn-cancel-custom {
    background: linear-gradient(135deg, #858796 0%, #6c757d 100%);
    border: none;
    color: white;
    padding: 0.875rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(133, 135, 150, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cancel-custom:hover {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(133, 135, 150, 0.4);
    color: white;
}

.btn-cancel-custom:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(133, 135, 150, 0.3);
}

.btn-save-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.875rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-save-custom:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
    color: white;
}

.btn-save-custom:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-save-custom:disabled {
    background: linear-gradient(135deg, #d1d3e2 0%, #b7b9cc 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-cancel-custom i,
.btn-save-custom i {
    font-size: 1.1rem;
    margin-right: 0.5rem;
}
@media (max-width: 576px) {
    .action-buttons-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-cancel-custom,
    .btn-save-custom {
        width: 100%;
        padding: 0.75rem 1.5rem;
    }
}

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

input.autocomplete-input {
    background-color: white !important;
    border: 2px solid #d1d3e2 !important;
    border-radius: 0.35rem;
    padding: 0.6rem 2.5rem 0.6rem 0.75rem;
    transition: all 0.2s ease;
    width: 100%;
    font-size: 0.95rem;
}

input.autocomplete-input:hover {
    border-color: #4e73df !important;
    box-shadow: 0 0 0 0.15rem rgba(78, 115, 223, 0.15);
}

input.autocomplete-input:focus {
    background-color: white !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    outline: none;
}

input.autocomplete-input::after {
    content: '▼';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4e73df;
    pointer-events: none;
}

.autocomplete-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4e73df;
    pointer-events: none;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

input.autocomplete-input:focus + .autocomplete-icon {
    color: #667eea;
    transform: translateY(-50%) rotate(180deg);
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
    animation: slideDownFade 0.2s ease;
}

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

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f1f3f5;
    color: #5a5c69;
    font-size: 0.9rem;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: linear-gradient(135deg, #e7f3ff 0%, #d6ebff 100%);
    color: #2c5aa0;
    padding-left: 1.5rem;
    font-weight: 600;
}

.autocomplete-item.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
}

.autocomplete-empty {
    padding: 1rem;
    text-align: center;
    color: #858796;
    font-style: italic;
    font-size: 0.85rem;
}

.autocomplete-dropdown::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: #f8f9fc;
    border-radius: 0 0.5rem 0.5rem 0;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

input.autocomplete-input.has-value {
    background-color: #f8f9fc !important;
    border-color: #1cc88a !important;
    font-weight: 600;
}

/* Placeholder personalizado */
input.autocomplete-input::placeholder {
    color: #a0a0a0;
    font-style: italic;
    opacity: 0.8;
}