/* Estilos específicos para el formulario de configuración del vault */

/* Contenedor principal */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: #f4f6fb;
    box-shadow: 0 15px 35px rgba(30, 42, 85, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

/* Título principal */
h1 {
    background: linear-gradient(90deg, #1e2a55 0%, #2e4fa2 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin: 0;
    font-size: 2.2em;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(30, 42, 85, 0.18);
}

/* Contenido del formulario */
form {
    padding: 40px;
}

/* Secciones de configuración */

.config-section {
    margin: 30px 0;
    padding: 25px;
    border: 2px solid #e5e8ef;
    border-radius: 12px;
    background: #f4f6fb;
}


.config-section h2 {
    color: #1e2a55;
    font-size: 1.6em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2e4fa2;
}

/* Items de configuración */
.config-item {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Etiquetas */
label {
    display: block;
    margin: 15px 0 8px 0;
    color: #222b45;
    font-weight: 600;
    font-size: 1em;
}

/* Campos de entrada - TODOS los tipos */
input[type="text"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafbfc;
    margin-bottom: 10px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* Placeholder */
input::placeholder {
    color: #a0a6aa;
    font-style: italic;
}

/* Select personalizado */
select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    padding-right: 45px;
}

/* Botones principales del formulario */
.form-group {
    text-align: center;
    margin: 40px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}


.btn-submit {
    display: inline-block;
    padding: 15px 25px;
    margin: 10px;
    background: linear-gradient(90deg, #1e2a55 0%, #2e4fa2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.btn-submit:hover {
    background: linear-gradient(90deg, #2e4fa2 0%, #1e2a55 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 79, 162, 0.18);
}

/* Botones pequeños */
.add-button, .remove-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 20px;
    margin: 10px 5px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-button:hover {
    background: #005a82;
    transform: translateY(-1px);
}

.remove-button {
    background: #dc3545;
}

.remove-button:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Enlace de volver */

.btn-back {
    display: inline-block;
    padding: 15px 25px;
    margin: 20px;
    background: #2e4fa2;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-back:hover {
    background: #1e2a55;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 79, 162, 0.18);
    text-decoration: none;
    color: white;
}

/* Alertas */
.alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    font-weight: 500;
}


.alert-success {
    background: #e5e8ef;
    color: #1e2a55;
    border: 1px solid #2e4fa2;
}

.alert-error {
    background: #fbe9e7;
    color: #d32f2f;
    border: 1px solid #2e4fa2;
}

/* Configuraciones actuales */
.current-configs {
    background: #e9ecef;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
}

.current-configs h3 {
    color: #495057;
    margin: 15px 0 10px 0;
    font-size: 1.2em;
}

.current-configs p {
    margin: 8px 0;
    color: #6c757d;
}

/* Entradas de configuración con acciones */
.config-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 8px 0;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.config-entry p {
    margin: 0;
    flex-grow: 1;
}

.config-actions {
    display: flex;
    gap: 8px;
}

.btn-edit, .btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-edit {
    background: linear-gradient(90deg, #17a2b8 0%, #2e4fa2 100%);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(90deg, #2e4fa2 0%, #17a2b8 100%);
    transform: translateY(-1px);
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
/* Centrar el título del popup de edición */
#editTitle {
    text-align: center;
    width: 100%;
    display: block;
}
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

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

.modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 500;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: #f1f1f1;
    transform: scale(1.1);
}

.modal-body {
    padding: 25px;
    max-height: 500px;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    border-top: 1px solid #dee2e6;
}

.btn-cancel, .btn-save {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.btn-save {
    background: #28a745;
    color: white;
}

.btn-save:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Grupos de campos en modal */
.field-group {
    margin-bottom: 20px;
}

.field-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.field-group input,
.field-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

.field-group input:focus,
.field-group select:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
    form {
        padding: 20px;
    }
    
    .config-section {
        padding: 15px;
    }
    
    .config-item {
        padding: 15px;
    }
    
    .btn-submit {
        width: 100%;
        margin: 5px 0;
    }
    
    h1 {
        font-size: 1.8em;
        padding: 20px;
    }
    
    .config-entry {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .config-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.2em;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .btn-cancel, .btn-save {
        min-width: 100px;
        margin: 5px;
    }
}
